----- Original Message -----
From: George Vieira
To: Sydney Linux Users Group (E-mail)
Sent: Thursday, December 13, 2001 8:49 AM
Subject: [SLUG] Perl help. web script.
>ls -lt ./new/*.txt | while read FILE
>do
> process $FILE
>done
I am by no means a perl expert but one way to do this in perl would be..
@files = split /\n/,`/bin/ls -1 ./new/*.txt`;
foreach $file (@files){
#process files here
}
>Another thing I need to know how to delete a file in Perl, I looked up the
Perl Docs' on >perl.com but the delete command talks about hashed file
records and so on and no to do >a basic DEL FILE...????
I think the function you are looking for is unlink.
Documentation for perl's in built functions should be available via
man perlfunc
---Gareth Walters
htttp://www.microforte.com.au
http://www.bigworldgames.com
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug