[plug] A question for perl hackers

bob bob at fots.org.au
Thu Aug 22 05:58:06 WST 2002


On Wed, 2002-08-21 at 23:18, Leon Brooks wrote:
> On Wed, 21 Aug 2002 23:00, Lyndon Kroker wrote:
> > I am trying to grab the filesize in bytes from a listing like:
> >
> >    310272 Aug 21 22:18 inbox
> >   5193576 Jul  7 09:45 lyndon
> >         0 Aug 12 09:58 mailing lists
> >     32720 Jun 10 20:10 mchoice
> >     46513 Aug 16 16:18 netvigator
> >         0 Aug 21 20:04 outbox
> >  10069208 Aug 21 20:04 sent-mail
> >   2377093 Aug 21 19:33 trash
> 
> Pity you can't use (g)awk, 'coz that becomes:
> 
>     variable = $1
> 
> Huge. I'd be surprised - nay, mortified - if there wasn't a similarly simple 
> way of doing that in PERL.

Yah, every now and then I see something like this being done in Perl and
remember why I like REXX so much

[feed in data]
parse arg size month day time filename
[do stuff with size]
etc

A directory listing like this can be read into a stem to be munged to
your hearts content :).

Doing "strings" is REXX's forte :).

> Cheers; Leon

-- 
bob
Cave canem...te necet lingendo.



More information about the plug mailing list