Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Mkdir failing

by NetWallah (Canon)
on Dec 02, 2011 at 16:53 UTC ( [id://941379]=note: print w/replies, xml ) Need Help??


in reply to Mkdir failing

One thing to improve your code:
The construct:
open ONE,"<","Filename" || die "Cannot open the file ";
Will not DIE as you expect, due to operator precedence (The 'die' will NEVER get executed).

The preferred, and correct usage is:

open my $one ,"<","/var/www/html/piRNA_html/UNAFold/output_folder_1.tx +t" or die "Cannot open the file (ONE): $!"; # Note the use of a block-scoped variable $one, # and "||" replaced by the low-precedence "or" # and "$!" added to provide the OS error message corresponding to +the failure @folder = <$one>; close $one;

            "XML is like violence: if it doesn't solve your problem, use more."

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2024-03-28 10:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found