Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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


Comment on Re: Help with scalar values and array as arguments to function
Download Code

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 taking refuge in the Monastery: (4)
As of 2014-10-22 02:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls