in reply to Tail a log, then match its string
to:my $tail = system("tail -1 /var/log/ping_10.10.0.100.sj");
qx captures the output of the tail command into a variable; system does not. system returns the exit status of the command, which is 0 if the command succeeded. That is why you can match 0.my $tail = qx(tail -1 /var/log/ping_10.10.0.100.sj);
Please update your node and use code tags around your data and code: see Writeup Formatting Tips
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tail a log, then match its string
by perl_zen_noob (Initiate) on Feb 24, 2010 at 03:38 UTC |