Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: replace/substituion 4th field

by BillKSmith (Chaplain)
on Feb 20, 2013 at 13:58 UTC ( #1019784=note: print w/ replies, xml ) Need Help??


in reply to replace/substituion 4th field

Use perl runtime options. Specify input file on command line. Redirect output to a file with your shell.

#!perl -p use strict; use warnings; my @fields = split /,/; $fields[3] = $fields[3] > 310 ? 'volmed' : $fields[3] == 70 ? 'volmedl': $fields[3] ; $_ = join ',', @fields;
Bill


Comment on Re: replace/substituion 4th field
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2014-12-19 08:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (74 votes), past polls