in reply to Re: restoring special variable defaults
in thread restoring special variable defaults

In that case, can I do something like:

printf "%5.3f",@yummy;

to print all the elements of yummy in that format? My problem is that I have an array of variable length that I want to print out nicely, which is why $# seemed the only reasonable solution.

BTW, the scope thing should work for me, I was just curious.

  • Comment on Re: Re: restoring special variable defaults

Replies are listed 'Best First'.
Re: Re: Re: restoring special variable defaults
by ysth (Canon) on Feb 09, 2004 at 17:13 UTC
    No, you would need to do printf "%5.3f " x @yummy, @yummy or print join " ", map sprintf("%5.3f",$_), @yummy (both untested).