Return to Snippet

Revision: 56233
at March 17, 2012 03:30 by EmbeddedInsanity


Initial Code
my @thing = split(/\n/, $results->{_content});
foreach my $item(@thing) {
   # The Needful
}

Initial URL


Initial Description
Splits on new line, to load array, and cycle through each line in array. 

In this example, we are loading the holding array "@thing" with data from the "_content" key of the $results hashref.

Initial Title
Iterate through variable line by line.

Initial Tags
simple

Initial Language
Perl