fellow monks,
i am currently tring to learn perl so im attempting to
do the exercises from the tutorials. here is the code.
#!/opt/perl5/bin/perl -w
use strict;
while($line=<> and $line ne ".\n"){
push @lines,$line;
}
foreach(reverse @lines){
print;
}
for reasons unknow to me i keep getting these errors
Global symbol "$line" requires explicit package name at day1_test.1.pl
+ line 5.
Global symbol "$line" requires explicit package name at day1_test.1.pl
+ line 5.
Global symbol "@lines" requires explicit package name at day1_test.1.p
+l line 6.
Global symbol "$line" requires explicit package name at day1_test.1.pl
+ line 6.
Global symbol "@lines" requires explicit package name at day1_test.1.p
+l line 8.
Execution of day1_test.1.pl aborted due to compilation errors.
does anyone know why this program will not work correctly
snowrider