Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

capturing from path

by amoura (Initiate)
on Jul 09, 2002 at 20:43 UTC ( [id://180602]=perlquestion: print w/replies, xml ) Need Help??

amoura has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: capturing from path
by Fastolfe (Vicar) on Jul 09, 2002 at 21:19 UTC
    You may also be interested in reading the responses to these nodes below, as a very similar question was also asked today by one of your classmates:
Re: capturing from path
by Aristotle (Chancellor) on Jul 09, 2002 at 20:50 UTC


    Your question is rather unclear - do you want to store the files' contents' in the variables or just the filenames?

    In either case you will need readdir. In case you want to read the files, you will also need open and close as well as the <FILEHANDLE> operator.

    Once you explain yourself more clearly, we can provide more specific answers as well.

    Makeshifts last the longest.

Re: capturing from path
by Fastolfe (Vicar) on Jul 09, 2002 at 20:57 UTC
    To break a path up into directory and file components, you can either split on the / character, or for a more portable solution, use File::Spec's splitpath and splitdir functions.

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-21 08:21 GMT
Find Nodes?
    Voting Booth?

    No recent polls found