- Original Message -
From: Krishna, Hari [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 26, 2002 12:37 AM
Subject: Terrible at my logic - some more inputs
forgot to include the print statement
print OUTPT $ln54_1 $ln54_2 $ln54_3 $ln54_4 $ln54_5 $ln54_6 $ln54_7
$ln54_8;
Here's somemore inputs:
707 14788 21 414 9 355 8 344 1
805 4 724 2 781 2 719 41
788 30781 2 427 31820 8
Here's what my output looks like:
707 14 788 21 414 9 355 8 344 1
805 4 724 2 781 2 719 4 1
788 30 781 2 427 3 1820 8
Here's what I am expecting my program to do:
707 14 788 21 414 9 355 8 344 1
805 4 724 2 781 2 719 41
788 30 781 2 427 31820 8
Whats up with this??
Thanks a lot for your help.
Regards,
Hari.
no warnings;
my @string = (707 14788 21 414 9 355 8 344 1,
805 4 724 2 781 2 719 41,
788 30781 2 427 31820 8);
for(@string) {
for(my $i = 0; $i = 42; $i += 6) {
print substr($_, $i, 6), ;
}
print \n;
}
prints:
707 14 788 21 414 9 355 8 344 1
805 4 724 2 781 2 719 4 1
788 30 781 2 427 3 1820 8
I think this is what you also get. Why do you expect something else ?
Cheers,
Rob
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs