Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Broken Function

by Happy-the-monk (Abbot)
on Apr 04, 2014 at 13:22 UTC ( #1081128=note: print w/ replies, xml ) Need Help??


in reply to Broken Function

Perl has a -e test builtin, no need to use the shell's test function.

But a -r test suggests itself if you need to read the file.

If this is not just a fiddle-with-perl exercise, what you are doing is basically copying a file. You could shortcut all of it to use File::Basename qw(basename); use File::Copy qw(copy); copy $_[0], basename $_[0];

Cheers, Sören

Créateur des bugs mobiles - let loose once, run everywhere.
(hooked on the Perl Programming language)


Comment on Re: Broken Function
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2015-07-08 01:19 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 (93 votes), past polls