Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: system and -e question

by syphilis (Canon)
on Dec 29, 2012 at 04:36 UTC ( #1010780=note: print w/ replies, xml ) Need Help??


in reply to system and -e question

Is there any explanation for that?

One explanation is that $file2 exists, but it wasn't created where you expected and you're looking in the wrong place for it.

You can use File::Spec to determine the absolute path of $file2 - untested:

use File::Spec; use warnings; use strict; my $file2 = 'whatever it is'; my $abs_path = File::Spec->rel2abs($file2); print $abs_path, "\n";
Cheers,
Rob


Comment on Re: system and -e question
Download Code
Replies are listed 'Best First'.
Re^2: system and -e question
by dicty (Sexton) on Dec 31, 2012 at 20:21 UTC

    I just used File::Spec to print out the absolute path, but I cannot find the path with "ls" command. Below is the error message

    ls: /home/dicty/test_programs/test/30min_run/30min_run.scoredata.XML: No such file or directory

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (16)
As of 2015-07-30 16:47 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 (273 votes), past polls