Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

parsing a space-separated filename in a line with fields separated by spaces

by princepawn (Parson)
on Aug 15, 2007 at 21:48 UTC ( [id://632864]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    Mon Oct  1 17:09:23 2001 0 127.0.0.1 2611 1774034 a _ o r tmbranno ftp
    + 0 * c
    Mon Oct  1 17:09:27 2001 0 127.0.0.1 22 1774034 a _ o r tmbranno ftp 0
    + * c
    Mon Oct  1 17:09:27 2001 0 127.0.0.1 22 file with spaces in it.zip a _
    + o r tmbranno ftp 0 * c
    Mon Oct  1 17:09:31 2001 0 127.0.0.1 7276 p1774034_11i_zhs.zip a _ o r
    + tmbranno ftp 0 * c
    
  2. or download this
        our @field = qw(day_name month day current_time  year  transfer_ti
    +me
           remote_host     file_size filename   transfer_type   special_ac
    +tion_flag    
    ...
           authenticated_user_id completion_status);
        my %field;
        @field{@field} = split /\s+/, $line;
    
  3. or download this
    sub parse_line {
        my $self = shift;   my $line = shift or die "must supply xferlog l
    +ine";
    ...
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://632864]
Approved by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 05:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found