Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Problem with split using a | separator

by Marshall (Canon)
on Jan 26, 2009 at 03:19 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-03-29 14:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found