Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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.


      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?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2018-07-17 04:13 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (354 votes). Check out past polls.