Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://880512]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2017-07-22 11:27 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (338 votes). Check out past polls.