Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Perl System command

by ColtsFoot (Chaplain)
on Jan 07, 2004 at 14:21 UTC ( [id://319449]=note: print w/replies, xml ) Need Help??


in reply to Perl System command

You could try something like
my $error = system('del temp.txt'); print qq(Return value is $error\n);
HTH

Replies are listed 'Best First'.
Re: Perl System command
by Abigail-II (Bishop) on Jan 07, 2004 at 14:27 UTC
    Add a
    $error >>= 8;
    between your first and last line to get a more accurate value.

    Abigail

Re: Re: Perl System command
by arunsub (Novice) on Jan 07, 2004 at 14:30 UTC
    Thanks for the quick reply. We r having a small problem with the return codes, the Return Code displayed is a multiple of "Actual Code * 256" Ex:- If the file is not present the expected code is 1 and getting return code as 256.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://319449]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-03-29 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found