develooper Front page | perl.beginners | Postings from May 2008

File and perl

Thread Next
From:
Richard Lee
Date:
May 1, 2008 17:45
Subject:
File and perl
Hi guys,

I have been running below to gather into a txt file before running perl 
program to analyze the data but I want to transform into 100% perl.
so, right now my little line says

ls -ltr | tail -100 | cut -d' ' -f13 | while read n ; do zcat -d $n | 
grep -i 'server|client' | /usr/bin/program1  | egrep -i 
"bunch|of|other|things"  ; done > /tmp/results

I am looking to replace this w/ perl which I think I can rather do 
easily on latter parts but this below I am sure

ls -ltr | tail -100 | cut -d' ' -f13

bascially I am looking for last 100 files.. is there an easy way to do 
this in perl?(with and w/out modules ?)
I am going to search on this as well...

Let me know please.

thank you.

Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About