ZWcarp has asked for the wisdom of the Perl Monks concerning the following question:
Hello monks, I was wondering if there is a way to use $` and $' in bash commands... lets say
perl -lane '$F[1]=~s/(chr\w[^_]?)_.*\b/$1/;print $`. "\t". $F[1] ."\t" .$'' (which does not work because the apostrophe ends the executable... \' doesn't work either) .Also why is it that \1 doesn't work... is using $1 the correct way to do this? If anyone knows of a reference that documents what special characters translate to bash commands it would be very appreciated. Thank you for your help.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: $` $' in bash??
by ikegami (Patriarch) on Jul 20, 2011 at 18:01 UTC | |
Re: $` $' in bash??
by Sandy (Curate) on Jul 20, 2011 at 17:22 UTC | |
by ikegami (Patriarch) on Jul 20, 2011 at 18:12 UTC | |
by Sandy (Curate) on Jul 21, 2011 at 16:37 UTC | |
by ikegami (Patriarch) on Jul 21, 2011 at 19:49 UTC | |
Re: $` $' in bash??
by JavaFan (Canon) on Jul 20, 2011 at 20:16 UTC |
Back to
Seekers of Perl Wisdom