When I started with variables to print a variable $foo
in a string
I used print ${foo}s
but when I used print "$(foo)s"
it gave me
1000 4 24 27 30 46 108 125 1000)s
. When I printed $(
or $)
it gives me the sequence 1000 4 24 27 30 46 108 125 1000
. Also
$[
gave 5.014002
and $]
gave 0
. What do they mean?
perldoc -v $(
(use quoting appropriate for your system if necessary) is a quick way to look up built-in variables.