Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2015-10-09 00:13 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (232 votes), past polls