AW: system

2004-03-09 Thread Dietmar Maurer
Use 

system(cmd /c dir /s);

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] Im 
 Auftrag von Hon Shi
 Gesendet: Dienstag, 09. März 2004 14:28
 An: [EMAIL PROTECTED]
 Betreff: system
 
 
 I've never seen this.
 
 I have a 2k box with 5.8.  This simple one liner will not run.
 Any ideas (besides an OS reinstall).  Everything else runs just
 fine.  Only system fails. (All the other boxes run it)
 
 
 system(dir /s);
 
 
 __
 Do you Yahoo!?
 Yahoo! Search - Find what you’re looking for faster
 http://search.yahoo.com
 ___
 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


AW: Wierd Perl syntax ($#$dlr) explanation, please!

2003-11-21 Thread Dietmar Maurer
Ok, now I see, check the following code:

use strict;

my @a = (3, 2, 1);
my $max_index_of_a = $#a;

print max index of a is $max_index_of_a\n;

my $ref = [EMAIL PROTECTED]; # a reference
my $max_index_of_ref = $#$ref;

print max index of ref to a is $max_index_of_ref\n;

Bye,
Dietmar

 -Ursprüngliche Nachricht-
 Von: Kevin Hill [mailto:[EMAIL PROTECTED]
 Gesendet: Freitag, 21. November 2003 12:44
 An: Dietmar Maurer; Perl Win32 Users (E-mail); Active Perl Mailgroup
 (E-mail)
 Betreff: RE: Wierd Perl syntax ($#$dlr) explanation, please!



 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


AW: Storing a 32-bit integer in 4 bytes

2002-02-20 Thread Dietmar Maurer

You're writing the string 31554399 to the file.

Use something like

print WRITE pack(I, $num);

See perldoc -f pack

Dietmar

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]Im Auftrag von
 Sisyphus
 Gesendet: Mittwoch, 20. Februar 2002 09:51
 An: [EMAIL PROTECTED]
 Betreff: Storing a 32-bit integer in 4 bytes


 Hi,

 Can a 32 bit integer be written to a file in such a way that it
 is stored in
 only 4 bytes ?

 I thought that binmoding the filehandle might do this - but  I'm finding
 that a number such as 31554399 is consuming 8 bytes (one byte for each
 digit), irrespective of whether the filehandle has been binmoded or not.

 my $num = 31554399;
 open (WRITE, test_file)
 or die Can't open WRITE: $!;
 binmode WRITE; # or not
 print WRITE $num;
 close (WRITE)
  or die Can't close WRITE: $!;

 Cheers,
 Rob

 ___
 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




AW: The Perl Journal is dead :(

2001-01-17 Thread Dietmar Maurer

From http://news.perl.com

The State of The Perl Journal [Links]
EarthWeb bought The Perl Journal back in May 1999, and now EarthWeb has sold
its web sites and newsletters to Internet.com. It is not clear how TPJ will
be affected. Jon Orwant, editor of TPJ, sent out some email telling us
what's going on: TPJ is apparently still owned by EarthWeb, issue #20 is
done but waiting to be printed, and the future of TPJ is uncertain.

Read also the Email from Jon Orwant at
http://use.perl.org/article.pl?sid=01/01/03/0044235

Dietmar

 -Ursprungliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]Im Auftrag von
 Jose Quesada
 Gesendet: Mittwoch, 17. Janner 2001 12:19
 An: [EMAIL PROTECTED]
 Betreff: The Perl Journal is dead :(



 Today, 01-17-01, I tried to read some TPJ articles, and all that I was
 able to find was a nasty '404 not found' error.
 It seems that TPJ has died, definitively. Somebody knows if there are
 any mirrors keeping the invaluable articles?

 Jose.

 --
 Jose Quesada Jimenez

 [EMAIL PROTECTED]
 http://lsa.colorado.edu/~quesadaj
 http://geneura.ugr.es/~jose

 visitor researcher
 Institute of Cognitive Science
 University of Colorado (Boulder)



 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users