Beefy Boxes and Bandwidth Generously Provided by pair Networks BBQ
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: arguments to perl -e

by explorer (Chaplain)
on Apr 08, 2006 at 09:14 UTC ( #542026=note: print w/ replies, xml ) Need Help??


in reply to Re: arguments to perl -e
in thread arguments to perl -e

Other solution. Insert $var variable before the file and send the stream. The Perl script will read it at BEGIN step:

#!/bin/bash file="timer" var="Two" (echo $var; cat $file) | perl -e 'BEGIN { $var=<> } print <>; END { p +rint $var }' > output

Ok... Is UGLY, I know it... but I have impatience!


Comment on Re^2: arguments to perl -e
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://542026]
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: (16)
As of 2014-04-17 17:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (453 votes), past polls