> Functions and global variables in a Perl 4 style library will belong to the
> package from where the library is loaded. Consequently it's possible to do
> something like:
>
> # MyLib.pl
> # --------
> sub trim {
>    for ( $_[0] ) {
>        s/^\s+//;
>        s/\s+$//;
>    }
> }
>
> # MyFunctions.pm
> # --------------
> package MyFunctions;
> do 'MyLib.pl';
> 1;
>
> # main script
> # -----------
> use MyFunctions;
> my $string = '   hello   ';
> MyFunctions::trim($string);
>
>
> HTH
>
> --
> Gunnar Hjalmarsson

Gunnar,

This may be a useful workaround for me, I'll give it a try.  Thanks
for your response.

Sincerely,

John

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to