Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: listing all files of a dir

by kcott (Chancellor)
on Jul 12, 2013 at 06:22 UTC ( #1043881=note: print w/replies, xml ) Need Help??


in reply to listing all files of a dir

G'day torres09,

See readdir. A slight modification of the second example should do what you want.

-- Ken

Replies are listed 'Best First'.
Re^2: listing all files of a dir
by torres09 (Acolyte) on Jul 12, 2013 at 06:27 UTC
    thanks for replying , just one more thing how to point to the current directory as in
    opendir(my $dh, $some_dir) || die;

    instead of $somedir , how can we have present directory

      use Cwd

      These questions are searchable.


      Dave

      You can use Cwd for that.

      -- Ken

        no I did getcwd , but I am on windows , so it gives error stating "unidentified subroutine "

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1043881]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2017-10-17 13:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (232 votes). Check out past polls.

    Notices?