Skip to content

Instantly share code, notes, and snippets.

@wolfiestyle
Created October 17, 2012 19:26
Show Gist options
  • Save wolfiestyle/3907574 to your computer and use it in GitHub Desktop.
Save wolfiestyle/3907574 to your computer and use it in GitHub Desktop.
strange error in line 7
#!/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