I'm teaching myself perl, and in the example programs, this program is offered.
#!/usr/bin/perl
use strict;
use warnings;
($a, $b) = (10, 20);
print "$a $b";
This program works fine. On the other hand, when I try this:
#!/usr/bin/perl
use strict;
use warnings;
($a, $b, $c) = (10, 20, 30);
print "$a $b $c \n";
it doesn't work. What is going wrong?
Sorry, both problems use "\n" in the print, I just missed the first one...
#!/usr/bin/perl
use strict;
use warnings;
($a, $b) = (10, 20);
print "$a $b";
This program works fine. On the other hand, when I try this:
#!/usr/bin/perl
use strict;
use warnings;
($a, $b, $c) = (10, 20, 30);
print "$a $b $c \n";
it doesn't work. What is going wrong?
Sorry, both problems use "\n" in the print, I just missed the first one...