in reply to Undefined subroutine &main::savemail called at skrypt.pl line 36, <FD> line 2.
As the Anonymous One pointed out, the code you showed lacks a subroutine called savemail. Is that code you wrote, or are you trying to use a function from some library? In that case you'll have to load the other library with require or use and import the function(s) you want to use. For a hypothetical example:
use strict; use warnings; use Other::Library qw/ savemail /; ...
On a side note:
This would be better written with split:{ $_ =~ m/([^:]*):(\S*)/; $username = $1; $password = $2; &checkdomain($username); }
open my $FH, '<', $mails or die "Nie moge otworzyc pierwszego pliku"; while ( <$FH> ) { chomp; my ($username, $password) = split /:\s*/; checkdomain($username); }
You might also want to see about getting rid of that tree of conditional elsifs, using a small library in your script to look up the values for $domena. There are many ways to do this; one solution would be to compile the regular expressions and use them as the keys of a look-up table in a hash.
Hope this helps!
|
|---|