BTW, my ls -l output does not have 9 fields (only for symlinks, where the ninth field is "->"). I guess you can get rid of the shell call altogether if you use stat() and glob() (or readdir() or IO::Dir).my $i=0; print map { (split)[8]; } grep { ! /^d/ && ! /file1/ && $i++ } `ls -l ./logs/`;
In reply to Re: Shell Commands executed in perl script
by betterworld
in thread Shell Commands executed in perl script
by msk_0984
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |