Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Error while trying to open a file

by k_manimuthu (Monk)
on Jan 05, 2011 at 04:11 UTC ( #880512=note: print w/ replies, xml ) Need Help??


in reply to Error while trying to open a file

Check the file is exists or not.

$file='File Path'; print "\nFile $file ", (-e $file && -f $file ) ? "exists" : "doesn't e +xists";

Get the OS error by using of $!

open (FILEHANDELER,"FILEPATH") || die "Cannot open the input file : $! +";

And check the file permission


Comment on Re: Error while trying to open a file
Select or Download Code
Replies are listed 'Best First'.
Re^2: Error while trying to open a file
by ritchie (Initiate) on Jan 05, 2011 at 15:41 UTC
    The file exists and it has read and write permission too. If i replace $artefact with the name of the file it works.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (15)
As of 2015-07-28 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (257 votes), past polls