kluther has asked for the wisdom of the Perl Monks concerning the following question:
when I do this in perl like this:if [ a`/usr/well561/bin/newlogfile 1` = aY ]; then echo "true" else echo "false" fi
I get an error about using Bareword "Y" in strict mode, when I take the strict mode out I don't get the right result. How should I rewrite the above in Perl. I've tried several things but they don't work, mostly an error on Bareword "Y". Advise please Thanx Klutherif (`/usr/well561/bin/well.newlogfile 1` eq Y) { print "true"; } else { print "false"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: shellscript to Perl
by LanX (Saint) on Mar 15, 2012 at 12:24 UTC | |
|
Re: shellscript to Perl
by eyepopslikeamosquito (Archbishop) on Mar 15, 2012 at 21:47 UTC | |
|
Re: shellscript to Perl
by Anonymous Monk on Mar 15, 2012 at 12:27 UTC | |
|
Re: shellscript to Perl
by osbosb (Monk) on Mar 15, 2012 at 12:26 UTC | |
|
Re: shellscript to Perl
by muppetjones (Novice) on Mar 16, 2012 at 19:11 UTC |