----- Original Message ----- From: <[EMAIL PROTECTED]> To: "Beginners Perl Mailing List" <[EMAIL PROTECTED]> Sent: Wednesday, September 25, 2002 3:33 AM Subject: Looping through readdir()
> Hello, All: > > When using... > > while ($x = readdir(DH)) { > # What came before $x? > # What will come after $x? > } > > How can I look at the next item in the directory? If you want to move around in the list, you should read all the files into an array: my @files = readdir(DH); Then you can examine all of them any way you want to. See also 'perldoc -f glob' as an alternative to using opendir/readdir -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]