in reply to Re: split function
in thread split function
Not sure what "typo" but here is the entire subroutine. The perl program uses strict and warnings. Code runs produces desired output, I just don't understand why. Not my code just trying to understand the reference to and array element when I don't see an array element available?
sub get_cc_view{ my @ccView = (); @ccView = (grep /Set view:/, @ccView)[0]; my $view = (split(/:/ , $setView))[1]; $view =~ s/\s//g; $CC_View = $view; $CC_View = "View: $CC_View"; }
I understand all code except my $view = (split(/:/ , $setView))1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: split function
by AnomalousMonk (Archbishop) on Apr 28, 2015 at 13:52 UTC | |
by gimcdan (Acolyte) on Apr 28, 2015 at 14:16 UTC | |
by AnomalousMonk (Archbishop) on Apr 29, 2015 at 01:31 UTC |