Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: breaking up a file by delimiter

by jwkrahn (Monsignor)
on Oct 07, 2018 at 04:55 UTC ( #1223631=note: print w/replies, xml ) Need Help??


in reply to breaking up a file by delimiter

use strict; use warnings; use Data::Dumper; $Data::Dumper::Indent = 0; my $file = 'test'; my @data; { local $/; open my $FILE, '<', $file or die "Cannot open '$file' because: $!" +; @data = grep /\S/, split /XXX\n/, <$FILE>; } print Dumper \@data;

Replies are listed 'Best First'.
Re^2: breaking up a file by delimiter
by navalned (Beadle) on Oct 07, 2018 at 13:52 UTC

    This works great! Thanks!!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2022-05-26 13:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (93 votes). Check out past polls.

    Notices?