qsl has asked for the wisdom of the Perl Monks concerning the following question:
It prints,sub breakEmailAddress { my ($address) = shift(@_); @components = split('@', $address); @counter = split('@',$address); return (@components,@counter); } (@first,@second) = &breakEmailAddress('john@some.domain.com'); print"FirstArr:@first\n"; print"SecondArr: @second\n";
Advice me how to get the array individually.FirstArr:john some.domain.com john some.domain.com SecondArr:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to return multiple array from subroutine
by ikegami (Patriarch) on Jul 04, 2006 at 13:04 UTC | |
by shmem (Chancellor) on Jul 04, 2006 at 17:13 UTC | |
by Anonymous Monk on Mar 27, 2013 at 13:02 UTC | |
|
Re: How to return multiple array from subroutine
by dorward (Curate) on Jul 04, 2006 at 13:04 UTC | |
by davorg (Chancellor) on Jul 04, 2006 at 13:14 UTC | |
|
Re: How to return multiple array from subroutine
by izut (Chaplain) on Jul 04, 2006 at 13:05 UTC | |
|
Re: How to return multiple array from subroutine
by madtoperl (Hermit) on Jul 04, 2006 at 13:05 UTC |