-start-
> Viola Mauro <[EMAIL PROTECTED]>
>at 07/13/2001 10:51 AM
>Hi!
>I have another "little problem": some my scripts on perl 5.005_03 (redhat
>6.0) work fine but not on perl 5.6.0 (redhat 7.0).
>I have discovered the problem but not the solution.
>I try to execute this little script of example on perl 5.005 and on perl
5.6.0
>#!/usr/bin/perl
>my %b=();
>my $a=\%b;
The correct form should be...
if (ref($a) eq 'HASH') { .. do something .. }
>#$a="HASH1234";
>if ($a=~/HASH/) {print "Contain HASH\n";}
>if ($a=~/^HASH/) {print "Start with HASH\n";}
The above two lines are not a very logical sequence of comparison at
all...
>my $firstChar=substr($a,0,1);
>print "FIRST Char =>$firstChar<=\n";
>STDOUT on 5.005:
> Contain HASH
> Start whit HASH
> FIRST Char =>H<=
>STDOUT on 5.6.0:
> Contain HASH
> FIRST Char =>H<=
Grant Hopwood.
Valero Energy Corp.
(210)370-2380
PGP Public Key: Ldap://certserver.pgp.com
nuclear iraq bioweapon encryption cocaine korea terrorist
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users