in reply to Re: file not found with OPEN (reafactor)
in thread file not found with OPEN

Another tip, this one about subroutines, they should return values not work on global variables, meaning
my $ftp = ftpsignin();; sub ftpsignin { use Net::FTP; my $ftp = Net::FTP->new( "ftp.sec.gov", Debug => 0, Passive => 1 ) or die "Cannot connect to some.host.name: $@"; $ftp->login( "anonymous", '-anonymous@' ) or next; #die "Cannot login ", $ftp->message; $ftp->binary(); # set binary mode return $ftp; ### RETURN VALUE } ## end sub ftpsignin
Why? coping with scoping explains

Replies are listed 'Best First'.
Re^3: file not found with OPEN (scope)
by wrkrbeee (Scribe) on Jan 06, 2015 at 21:02 UTC
    Thank you for the help!!! I am grateful. On another note, I thought I had thanked everyone for their help with this issue. However, I somehow missed thanking RLAURENT, and think I ruffled his feathers. But I wanna make it right. How do I reply to his last message?
      Don't worry about that, it only appears that you most probably simply missed the post where I told you to to add the "C:" volume information to your data path (and, yes, I was the first one to do so). It was here: Re^5: file not found with OPEN. I was just a bit saddened by the fact that you did not see it, nothing more, and perhaps overreacted to the fact that you thanked others and not me. But I have absolutely no problem with you, I think you simply overlooked the post, perhaps it was only too deeply nested for your PM settings, and I am absolutely ready to help you another time if needed and if I can. ;-)