dgillman has asked for the wisdom of the Perl Monks concerning the following question:
I ported a perl script from perl5.10 on Ubuntu10 to perl5.8.8 on Ubuntu8.04.4, and `echo -e ...` stopped working.
Here's the output of a toy script on perl5.8.8 on Ubuntu8.04.4:
Here's the toy script:-e hi there hi there /bin/echo
#!/usr/bin/perl -w my $result = `echo -e 'hi there'`; print "$result"; $result = `/bin/echo -e 'hi there'`; print "$result"; $result = `which echo`; print "$result";
I solved my current problem by replacing echo with /bin/echo, but what's going on here? (How come `which echo` doesn't tell me what's being used?) In general how do you control what linux command you're using in backticks?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: which echo
by thenaz (Beadle) on Aug 04, 2011 at 17:57 UTC | |
Re: which echo
by Anonymous Monk on Aug 04, 2011 at 19:34 UTC | |
Re: which echo
by cdarke (Prior) on Aug 05, 2011 at 07:19 UTC | |
Re: which echo
by ohcamacj (Beadle) on Aug 05, 2011 at 03:23 UTC |