[EMAIL PROTECTED] wrote, on Monday, May 01, 2000 15:31
: ok, let's say you have a file where each line looks like this:
: 
: --a--       430 Fri Mar 19 18:32:47 1999 D:\Program Files\Common
: Files\Adobe\Web\AwePrefs.txt
: 
: and you want to get the filename (and every other field) out of 
: it, the obvious
: thing to split on is whitespace (\s+) which give something like 
: the following:
: 
: my ( $attribs, $size, $day, $mon, $date, $time, $year, $file ) = 
: split(/\s+/,
: $line);

 = split(' ', $line, 8); # ' ' is the same as /\s+/ in split
# last parameter n is the limit; everything after the (n-1)st
# chunk of whitespace is stuffed into the nth piece.

perldoc -f split

perldoc is your friend.

Joe

==============================================================
          Joseph P. Discenza, Sr. Programmer/Analyst
               mailto:[EMAIL PROTECTED]
 
          Carleton Inc.   http://www.carletoninc.com
          219.243.6040 ext. 300    fax: 219.243.6060
 
Providing Financial Solutions and Compliance for over 30 Years


---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to