That's how I'm getting a series of values into a module, which seems to be working...however, when I parse those with this:($self, $keyword, $keyword2, $keyword3, $keyword4, $keyword5, $keyword +6, $domain) = (@_);
and then this is the sub &makeNlink$sub1 = $keyword; $sub2 = $keyword2; $sub3 = $keyword3; $sub4 = $keyword4; $sub5 = $keyword5; $sub6 = $keyword6; $noun1 = &makeNlink($sub1, $domain); $noun2 = &makeNlink($sub2, $domain); $noun3 = &makeNlink($sub3, $domain); $noun4 = &makeNlink($sub4, $domain); $noun5 = &makeNlink($sub5, $domain); $noun6 = &makeNlink($sub6, $domain);
The values are used over and over, the same series each time, when in the main script they are totally different. How do I make sure the current value of each variable is imported into this module? Thanks very, very much for the help! This place rocks.sub makeNlink { #($tobelink, $tobelinkurl) = @_; $tobelink = shift(@_); $tobelinkurl = shift(@_); $withspaces = $tobelink; $tobelink =~ s/\s/_/g; chomp($withspaces); chomp($tobelink); $totallyscrewed = "<a href \= \"http\:\/\/$domain\/$tobelink\" +>$withspaces<\/a>"; return $totallyscrewed; }
In reply to Re: Re: using perl variable in muliple modules
by jeremy_goodrich
in thread using perl variable in muliple modules
by jeremy_goodrich
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |