There's more than one way to do things | |
PerlMonks |
Re: system() on linux/win32by dhable (Monk) |
on Apr 25, 2002 at 15:55 UTC ( [id://162007]=note: print w/replies, xml ) | Need Help?? |
system returns a value of 0 when the command was successful. In your case, system returns 0 because it was successful so warn gets run. To solve the problem, check to see if the value is 0 like so: This should produce the right results. See the perlfunc on system for more information.
In Section
Seekers of Perl Wisdom
|
|