> As you can see, perl simplified your unquoted numerical strings
> by dropping the
> leading zeros *before* stringifying them to use as hash keys. Quoting them
> explicitly solves the problem.
Actually, Perl interprets the values with leading zeros as octal numbers;
that's why 00056 became 46
On Fri, 26 Nov 2004 20:41:01 -0800, $Bill Luebkert wrote:
> peace under the tree wrote:
>> I code this program but It don' t run, I don't know what the
>> problem with it, Can anyone help? Thank you!
>>
> Try (note the quoted numbers in hash keys) :
To follow up on what Bill said and better unders
peace under the tree wrote:
> hi, everyone
>
> I code this program but It don' t run, I don't know what the problem
> with it, Can anyone help? Thank you!
>
Try (note the quoted numbers in hash keys) :
use strict;
print "Enter id: ";
chomp (my $id=);
my @res = match ($id);
print "@res\n";
su
hi, everyone
I code this program but It don' t run, I don't know what the problem
with it, Can anyone help? Thank you!
#!/perl/bin/perl
use strict;
print "Enter id: ";
chomp (my $id=);
print match($id);
sub match
{
my $matchID=shift;
m