Created
October 17, 2012 19:26
-
-
Save wolfiestyle/3907574 to your computer and use it in GitHub Desktop.
strange error in line 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
sub test | |
{ | |
open FP, "< $0" or die; | |
while (<FP>) # Modification of a read-only value attempted at ./test.pl line 7. | |
{ | |
chomp; | |
print "w: $_\n"; | |
} | |
close FP; | |
} | |
for (qw(a b)) | |
{ | |
print "f: $_\n"; | |
test(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment