Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: extracting a filename from an ls -Rla

by Tomte (Priest)
on Aug 12, 2002 at 21:40 UTC ( [id://189646]=note: print w/replies, xml ) Need Help??


in reply to extracting a filename from an ls -Rla

Assuming that $ftp->ls() acts as its commandline cousin, just don't use l as an argument.
It stands for 'long' and gives you all the details you don't want.

You also might not want the a either, as it lists 'hidden' files, that depends on the context of your application.

As a second note, instead of the if(...){...} blocks you can write shorter
$ftp->doIt() || die("couldn't...");


regards,
tomte

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-25 07:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found