1

If else problem on perl

Project Type
Existing project
Summary

If else problem on perl

Description
I just needed to make a file in which it says hello world! And if I type 1 it says encode and if I type 2 it says decode Or else say wrong... In this file I get wrong always New in devrant
Tech Stack
perl
URL
Comments
  • 5
    This is not a collab, it's a Google search.

    There's also the if/else problem it's self, you have 2 IFs but only testing for 1. Code is ran procedurally unless told otherwise by default (top to bottom)

    You could use the typical if/else if/ else
    https://tutorialspoint.com/perl/...

    Or you can use a switch, which is more will be easier to manage with more conditions.

    https://tutorialspoint.com/perl/...
  • 10
    This is the worst wrong tag shitpost by a green dot ever
  • 1
    @theabbie
    U meant me Huh
    I installed devrant today only and I don't know how to use it
  • 3
    @Aridlvory DevRant isn't for programming doubts or homework problems, Collab tag is for finding collaborators for your projects, There is question tag for opinion-based questions, and primarily, this platform is fof Ranting, so, this doesn't fit for the platform.
  • 0
    When Devrant becoming a Stackoverflow or Reddit?
Add Comment