Thanks guys, that helps a lot.<br>
-Joseph-<br><br><div><span class="gmail_quote">On 10/24/05, <b class="gmail_sendername">John Macdonald</b> <<a href="mailto:john-Z7w/En0MP3xWk0Htik3J/w@public.gmane.org">john-Z7w/En0MP3xWk0Htik3J/w@public.gmane.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Mon, Oct 24, 2005 at 11:03:19AM -0400, Lennart Sorensen wrote:<br>> On Mon, Oct 24, 2005 at 10:52:13AM -0400, Joseph Kubik wrote:<br>> > What does the following mean?<br>> ><br>> > ($#{$reg->{'sale'}{'items'}} == -1)
<br>> ><br>> > As, in, What does $#{} really do?<br>><br>> $# = $OFMT, which is some weird deprecated perl thing that shouldn't be<br>> used anymore, because printf is a much more sane way to do things.
<br>><br>> Or so says the camel book.<br><br>Unfortunately, the expression {$reg...-1} following $#<br>means that this is not the scalar variable named $# whose<br>description you quote that is being used.<br><br>Just as the statement:
<br><br> $x{'a'} = $x;<br><br>refers to the array @x on the left side and the totally distinct<br>scalar variable $x on the right side. (Well, a guru could<br>quibble about the word totally, but for the purposes of this
<br>discussion, it is accurate enough.)<br><br>The other replies, gaving the meaning as the index<br>of the last element of the array whose reference is in<br>$reg->{'sale'}{'items'} (or -1 if there are no elements in<br>
that array) were correct.<br><br>--<br>--<br>The Toronto Linux Users Group. Meetings: <a href="http://tlug.ss.org">http://tlug.ss.org</a><br>TLUG requests: Linux topics, No HTML, wrap text below 80 columns<br>How to UNSUBSCRIBE:
<a href="http://tlug.ss.org/subscribe.shtml">http://tlug.ss.org/subscribe.shtml</a><br></blockquote></div><br>