So I have never used Perl prior to today, and am only doing so because my professor gave an example on this assignment with Perl. I took a picture of his code and am using exactly that, but it is not working for me
#!/usr/bin/ perl
open(FFF, "<usb256.001");
while(<FFF>)
{
if ( /([a-z0-9_.]+\@[a-z0-9_.]+\.[a-z0-9_](2,))/gi )
{
$email = $1;
print = "$email\n";
}
}
close(FFF);
it says Can't modify print in scalar assignment at datafinder.pl line 9, near ""$email\n";" which I do not understand. My professor was using linux and I am using windows, so I don't know if that may be causing issues. Also, I don't know what "gi" means at the end of the if statement, if anyone could give insight on that as well Thanks for any help given!