Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
if ($ARGV[0] ne "") { $destdir = $ARGV[0]; } else { if (exists $ENV{'LOGS_EV'}) { $destdir = $ENV{'LOGS_EV'}; } else { colored_printout(RED,"\nERROR: Environment variable LOGS_EV not +defined!"); } }
Here the above code prints the statement in the last else loop like "ERROR: Environment variable LOGS_EV not defined!". But i want the code to store the some value in the $destdir for this what changes can i do.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: In my perl code i am getting some other output instead of Other
by haj (Vicar) on Mar 24, 2022 at 10:35 UTC | |
Re: In my perl code i am getting some other output instead of Other
by Corion (Patriarch) on Mar 24, 2022 at 10:26 UTC | |
Re: In my perl code i am getting some other output instead of Other
by graff (Chancellor) on Mar 25, 2022 at 00:31 UTC |
Back to
Seekers of Perl Wisdom