Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Simple Perl one-liner in command lineby wewantmoore (Initiate) |
on Mar 25, 2015 at 11:47 UTC ( [id://1121288]=perlquestion: print w/replies, xml ) | Need Help?? |
wewantmoore has asked for the wisdom of the Perl Monks concerning the following question:
Dear Perl users,
I am very new to Perl, and am only using it in a script together with windows command line code in order to search, compare and print from and to a file. What I am trying to do is search for a string in an output file, compare the value behind the string to a given value, and depending on the comparison, to print a 1, or not, in another file. The one-liner(s) I am using now are as follows:
For some reason it just doesn't work. The script will print a 1, or not, but the comparison is not correct. It also seems as if after the script is run once, the script will always print the same after that. I'm sure (and hoping) that there is a very simple solution to my problem. Possibly just the syntax for the comparison? Thanks in advance, Reuben.
Back to
Seekers of Perl Wisdom
|
|