ap3k has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I hope this is possible, or i have just wrote a script for nothing!
I have a directory on my server '/var/log/user' which contains files with random names (based on date/time and random numbers). Each one of these files has the following layout:
I have no idea how to do this, so help would be much appreciated.
I hope this is possible, or i have just wrote a script for nothing!
I have a directory on my server '/var/log/user' which contains files with random names (based on date/time and random numbers). Each one of these files has the following layout:
I need the code to pick up one of these files, open it, put the contents of the file into $variable1 $variable2 ..... and then once it has done that, delete that file, so the script can then move on to the next file until it has read them all in, and no more files exist.variable1 variable2 variable3 variable4 variable5
I have no idea how to do this, so help would be much appreciated.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Pick Up Files and put contents into variables
by Daruma (Curate) on Aug 30, 2002 at 10:41 UTC | |
Re: Pick Up Files and put contents into variables
by fruiture (Curate) on Aug 30, 2002 at 10:43 UTC | |
by Anonymous Monk on Aug 30, 2002 at 11:27 UTC | |
by fruiture (Curate) on Aug 30, 2002 at 12:42 UTC | |
Re: Pick Up Files and put contents into variables
by kodo (Hermit) on Aug 30, 2002 at 10:47 UTC | |
Re: Pick Up Files and put contents into variables
by Vennis (Pilgrim) on Aug 30, 2002 at 10:48 UTC | |
by Anonymous Monk on Aug 30, 2002 at 11:31 UTC | |
by Vennis (Pilgrim) on Aug 30, 2002 at 11:37 UTC |
Back to
Seekers of Perl Wisdom