I got the last soln, ie to use File::Basename module. Please ignore the last
thread.

I am still interested to know why Rob's soln doesnt work for me?

Thanks much!


On 7/25/06, Nishi Bhonsle <[EMAIL PROTECTED]> wrote:


Hi:

In addition can i modify the all_files to return only the absolute
filename and not the filename alongwith the entire path?
Currently, it prints
C:\..\..\..\File1.txt
etc
I really want it only print File1.txt

Thanks!


 On 7/25/06, Nishi Bhonsle <[EMAIL PROTECTED]> wrote:
>
>
> Yes, all_files works. Its in the doc, and i missed it. Its my bad.
>
> Rob, I tried the code snippet you mentioned, apparently it doesnot
> return anything under the directory.
>
> Thanks, Nishi.
>
>  On 7/25/06, Dr.Ruud < [EMAIL PROTECTED]> wrote:
> >
> > Rob Dixon schreef:
> >
> > >    use strict;
> > >    use warnings;
> > >
> > >    my @dir = do {
> > >      opendir my $dh, 'C:\build\Sample\NewDir' or die $!;
> > >      grep -f, readdir $dh;
> >
> > For newbies, maybe put a comment here that the closedir() is implicit.
> >
> > >    };
> > >
> > >    print "$_\n" foreach @dir;
> >
> >
> > --
> > Affijn, Ruud
> >
> > "Gewoon is een tijger."
> >
> >
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > <http://learn.perl.org/> < http://learn.perl.org/first-response >
> >
> >
> >
>

Reply via email to