Dietmar,

Thanks for the response. I read that in the manual but it didn't make sense to me in 
the way that this was being used. There is a loop and, within it, the following:

        next if ($#$dlr == -1);

How would the awk-stuff below fit with this code above?

Ta.
K.

Kevin Hill
AVP Programmer
 
TradeWeb Europe Ltd 
99 Gresham Street
London EC2V 7NG
Tel:  +44 (0)20 7776 3200
Fax: +44 (0)20 7776 3201
www.tradeweb.com




-----Original Message-----
From: Dietmar Maurer [mailto:[EMAIL PROTECTED]
Sent: 21 November 2003 11:33 am
To: Kevin Hill
Subject: AW: Wierd Perl syntax ($#$dlr) explanation, please!


>From perlvar:

$#

The output format for printed numbers. This variable is a half-hearted
attempt to emulate awk's OFMT variable. There are times, however, when awk
and Perl have differing notions of what counts as numeric. The initial value
is ``%.ng'', where n is the value of the macro DBL_DIG from your system's
float.h. This is different from awk's default OFMT setting of ``%.6g'', so
you need to set $# explicitly to get awk's value. (Mnemonic: # is the number
sign.)
Use of $# is deprecated.


So $#$dlr is $# followed by $dlr.

Dietmar

> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Auftrag von
> Kevin Hill
> Gesendet: Freitag, 21. November 2003 12:12
> An: Active Perl Mailgroup (E-mail); Perl Win32 Users (E-mail)
> Betreff: Wierd Perl syntax ($#$dlr) explanation, please!
>
>
>
> Guys,
>
> Just found this in some of our legacy Perl code - any idea what
> it does? $dlr is a scalar, containing the name of a dealer.
>
>       $#$dlr
>
> Thanks for any help that can be given.
>
> Kev.
>
> Kevin Hill
> AVP Programmer
>
> TradeWeb Europe Ltd
> 99 Gresham Street
> London EC2V 7NG
> Tel:  +44 (0)20 7776 3200
> Fax: +44 (0)20 7776 3201
> www.tradeweb.com
>
>
>
> ________________________________________________________________________
>
> This e-mail may contain confidential and/or privileged
> information. If you are not the intended recipient (or have
> received this e-mail in error) please notify the sender
> immediately and destroy this e-mail. Any unauthorized copying,
> disclosure or distribution of the material in this e-mail is
> strictly forbidden. TradeWeb reserves the right to monitor all
> e-mail communications through its networks.
>
>
> _______________________________________________
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to