Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 pondering the Monastery: (7)
As of 2014-12-21 21:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (108 votes), past polls