in reply to Re^4: Adding hashes to already existing array
in thread Adding hashes to already existing array
poj#!perl use strict; use Data::Dump 'pp'; my @excerpts = (); my $fc = 'abcdfoofrobnicatebardefforspambazghi'; my $re2 = qr/(fo.)(.*?)(ba.)/; while ($fc =~ /$re2/g){ push @excerpts, { fpart => $1, bpart => $3, content => $1.$2.$3 } ; } pp @excerpts;
|
|---|