Hi Monks, i have an array with Strings, which looks like:
$VAR1 = 'Nov 19 06:31:17 proxy postgrey[2439]: action=pass, reason=tri +plet found, client_name=r41.newsletter.otto.de, client_address=185.15 +.51.41, sender=otto@newsletter.otto.de, recipient=some.one@some.domai +n'; $VAR2 = 'Nov 19 06:37:45 proxy postgrey[2439]: action=pass, reason=tri +plet found, client_name=uspmta194080.emarsys.net, client_address=217. +175.194.80, sender=suite17@xpressus.emarsys.net, recipient=other.one@ +some.domain';
I need to push some strings from the array into another array - for example the date, sender and recipient. I first try with date, like:
for my $x ( @results ) { chomp $x; my ($date) = split /'[A-z]*.[0-9]*.[0-9]*:[0-9]*:[0-9]*/, $x; push @out, $date; }
What results in the whole line:
May i ask someone to shed some light, please! Thanks!$VAR1 = 'Nov 19 06:31:17 proxy postgrey[2439]: action=pass, reason=tri +plet found, client_name=r41.newsletter.otto.de, client_address=185.15 +.51.41, sender=otto@newsletter.otto.de, recipient=some.one@some.domai +n';
In reply to Array of strings search by maikelnight
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |