in reply to Re: Export/import variables
in thread Export/import variables
From the above code, how could I export the users hash? I put @EXPORT = qw(%users); near the top of my code but it didn't work. I then tried $Bio->export_to_level(1 @_) but that didn't work either.sub import { my $self = shift; my %args = @_; $path = $args{path}; open(FILEREAD, "$path") or die "Cannot open $path for reading: $!\n"; read FILEREAD, $string, -s FILEREAD; close FILEREAD; @matches = $string =~ /\s.*\s.*\@.*\s/g; foreach (@matches) { if (/\s(.*)\s(.*\@.*)\s/) { $users{$1} = $2 } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Export/import variables
by bart (Canon) on Mar 19, 2003 at 21:08 UTC | |
|
Re: Re: Re: Export/import variables
by diotalevi (Canon) on Mar 19, 2003 at 21:11 UTC |