Beckett Richard-qswi266 wrote, on Friday, July 18, 2003 8:57 AM
: Is there a neater way of doing this:?
:
: my $sheet;
: foreach (1, 2, 4) {
: $sheet = $_;
: print "\$sheet = $sheet\n";
: }
Is this what you're looking for?
foreach my $sheet (1, 2, 4) {
print "\$sheet = $sheet\n";
}
Now, you could also
print "\$sheet = $sheet\n" foreach my $sheet (1, 2, 4);
but I have the feeling you mean to do more with $sheet
than print it out :).
Good luck,
Joe
==============================================================
Joseph P. Discenza, Sr. Programmer/Analyst
mailto:[EMAIL PROTECTED]
Carleton Inc. http://www.carletoninc.com
574.243.6040 ext. 300 fax: 574.243.6060
Providing Financial Solutions and Compliance for over 30 Years
***** Please note that our Area Code has changed to 574! *****
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs