When you pass arguments to a subroutine, they are passed in via the special array @_. To get them back into named scalars, assign that to the name(s) you want:
my $html = "hello"; routine( $html ); sub routine{ my( $arg1 ) = @_; print $arg1; }
NOTE: the variable name $arg1 is just an example.
In reply to Re: subroutine scalar string input
by BrowserUk
in thread subroutine scalar string input
by robertw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |