Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Help with scalar values and array as arguments to function

by CountOrlok (Friar)
on Jun 14, 2006 at 15:19 UTC ( #555271=note: print w/ replies, xml ) Need Help??


in reply to Help with scalar values and array as arguments to function

This is one of many ways to do it:
sub format_output { my $var1 = shift; my $var2 = shift; my @arrayref = @_; do_some_stuff; } my $scalar = 'abcdefghijklmnopq'; my @array = (); my @tmparray = split('',$scalar); @array = splice(@tmparray, 8, 6); &format_address(":", 0, @array);
-imran

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://555271]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2016-07-01 00:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (405 votes). Check out past polls.