We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Update: I asked this in the CB, but wanted to keep a record of it here for other inexperienced Monks like myself. In Downloading a lot of files yesterday, I did the classic or die whilst opening a file, as per most code I've ever seen. However, in the perlfaq, How can I read in an entire file all at once? I see a lot of || dieIn Downloading a lot of files, I use: open( RPMS, "<", "./upgrade.log" ) or die "can't open file: $!\n"; but in perlopentut - Simple Opens it shows open( INFO, ">", $datafile ) || die "Can't create $datafile: $!"; Which way is the best and why? Thanks,
Walking the road to enlightenment... I found a penguin and a camel on the way..... Fancy a yourname@perl.me.uk? Just ask!!! In reply to "or die" versus "|| die" by ghenry
|
|