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

Re^2: Bash for loop variable pass equivalent in perl

by aaron_baugher (Curate)
on Aug 10, 2012 at 18:06 UTC ( #986793=note: print w/replies, xml ) Need Help??

in reply to Re: Bash for loop variable pass equivalent in perl
in thread Bash for loop variable pass equivalent in perl

And to get perl's default line-by-line behavior in the shell, set IFS to a newline (The ctrl-V ctrl-J sequence inserts a raw newline into the command without ending it):

$ IFS="^V^J "; for i in `cat file`; do echo aaa $i; done

Aaron B.
Available for small or large Perl jobs; see my home node.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://986793]
[trippledubs]: everyone dog piled sundial again jeesh
[trippledubs]: BrowserUK used to refute point by point and used insults that had me running to the dictionary, it was really good reading
[Corion]: Yay. I finally found the URL I need to scrape to export the raw Google Keep data. Except that Google Chrome has a bug that doesn't let me get at this data :-( (and Firefox is not amenable to automation anymore :( )

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2018-02-22 18:53 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (298 votes). Check out past polls.