Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Question about Open and Close

by TheHobbit (Pilgrim)
on Jun 08, 2002 at 19:37 UTC ( [id://172825]=note: print w/replies, xml ) Need Help??


in reply to Question about Open and Close

Hi,
While I cannot realy tell where the problem in your code is, I can give you a good advice: <emph>always test return value of system calls</emph>. That means writing something like:

open(FOO,">$file") || die "Couldn't open $file: $!";
This should allow you to find where the error is... May be you'll even be able to found the solution! :)))

Cheers

Update: addent parenthesis, thank you gav^. This show me once again a thin: <emph>never, ever post code without trying it!</emph>.

TheHobbit goes to the monastery kitchens... will peeling 100 Kg potato's be enough to make ammend?


Leo TheHobbit

Replies are listed 'Best First'.
Re: Re: Question about Open and Close
by gav^ (Curate) on Jun 08, 2002 at 19:43 UTC
    I think you mean: open FOO,">$file" or die "Couldn't open $file: $!"; or open(FOO,">$file") || die "Couldn't open $file: $!";

    gav^

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-03-29 01:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found