mhearse has asked for the wisdom of the Perl Monks concerning the following question:
You can see I'm trying to get specific output with an awk statement. It doesn't seem to like the quoted statement. I've tried inserting backslashes with no luck. I am forced to put the awk statement in a file and call it like so:$good = `grep -i $vals[0] $file | awk '{ print $2 }'`
What am I missing? Is there a better way. Thanks.$good = `grep -i $vals[0] $file | awk -f myprint`
2004-05-05 Edit by jdporter: Changed title from 'backquotes'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unwanted interpolation in backquoted string
by Roger (Parson) on May 04, 2004 at 06:41 UTC | |
by graff (Chancellor) on May 04, 2004 at 12:00 UTC | |
by jdporter (Paladin) on May 04, 2004 at 22:11 UTC | |
by Roger (Parson) on May 04, 2004 at 13:12 UTC | |
by mhearse (Chaplain) on May 04, 2004 at 06:44 UTC | |
|
Re: Unwanted interpolation in backquoted string
by sgifford (Prior) on May 04, 2004 at 06:44 UTC | |
|
Re: Unwanted interpolation in backquoted string
by coec (Chaplain) on May 04, 2004 at 06:46 UTC | |
by Anomynous Monk (Scribe) on May 04, 2004 at 17:15 UTC | |
by coec (Chaplain) on May 05, 2004 at 00:18 UTC |