Are you trying to run it with the line $a="..."; commented out or not
commented out?

All seems to work fine on my 5.006001 either way.

Troy
 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]] On 
> Behalf Of Viola Mauro
> Sent: Friday, July 13, 2001 9:51 AM
> To: [EMAIL PROTECTED]
> Subject: [Perl-unix-users] regular expression problem!
> 
> 
> 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;
> #$a="HASH1234";
> if ($a=~/HASH/) {print "Contain HASH\n";}
> if ($a=~/^HASH/) {print "Start with HASH\n";}
> 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<=
> 
> if uncomment the line $a="HASH1234"; then all work. :O
> where is the problem? solutions?
> it's very important for me!
> 
> thx
> Mauro Viola
> 
> _______________________________________________
> Perl-Unix-Users mailing list. To unsubscribe go to 
> http://listserv.ActiveState.com/mailman/subscr> ibe/perl-unix-users
> 

_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users

Reply via email to