Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Problem with split using a | separator

by Marshall (Canon)
on Jan 26, 2009 at 03:19 UTC ( #738862=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ( $#ARGV < 0 ) {
        print "Usage: $0 [In File][Out File]\n";
    ...
    
    my $emtocin = $ARGV[0];
    my $emtocout = $ARGV[1] || 'cmpemtocout.txt';
    
  2. or download this
    die "Usage: $0 [In File][Out File]\n" if @ARGV <1;
    my ($emtocin, $emtocout)= @ARGV;
    $emtocout ||= 'cmpemtocout.txt';
    
  3. or download this
    my @fld = ( split(/\|/, $record ) )[0, 3..8];
    #and print could look like this:
    print FDOUT join("\n",@fld),"\n";
    #you don't need $outrecord
    
  4. or download this
    print FDOUT join("\n",@fld),"\n";
    #should have course been, 
    print FDOUT join('|',@fld),"\n";
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2022-12-09 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?