|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re^3: Context tutorialby toro (Beadle) |
| on Jun 16, 2011 at 23:49 UTC ( #910051=note: print w/ replies, xml ) | Need Help?? |
|
You're right. Don't know what I did before.
As explained to me by ikegami and runrig in the chatterbox: perl -e "$now = localtime(); print $now;" and perl -e ' = localtime(); print ;' are equivalent in bash (Ubuntu's default) unless $now is an Environmental variable within the Bash shell. In other words if one is doing some Bash scripting and has defined $1 as a variable within that shell-script ... then the way to access that same system (environmental) $1 is to use perl -e " ... $1 ... ". Cheers.
In Section
Tutorials
|
|
||||||||||||||||||||||||||||