On Mar 23, 11:08*pm, Tad J McClellan <ta...@seesig.invalid> wrote:
> ansher <Anshe...@gmail.com> wrote:
> > I have a file which looks something like this...
>
> [snip]
>
> > I want a list of values which qualifies the condition m/\&[a-z]+/.
>
> > It will be great if you can help me in how to get the exact pattern
> > match values to an array.
>
> ----------------
> #!/usr/bin/perl
> use warnings;
> use strict;
>
> my @ampersands;
> while ( <DATA> ) {
> * * push @ampersands, /(&[a-z]+)/g;}
>
> print "$_\n" for @ampersands;
>
> __DATA__
> l axn1;c=c(&dat)'&lnk';nz
> *include &tt.qin;tt=WEB
> *include &base.qin;
> *include q6.qin;
> *include q7.qin; axn=q7;col(b)=&kod;pun=&p;fil=&fb
> *include q8.qin; axn=q8;col(b)=&qod;pun=&p;fil=&fb
> n01&txt * * * * * * * * * * * * * * * * * * * * * * *;c=gkeeper.eq.1
> n01Not &txt * * * * * * * * * * * * * * * * * * *;c=gkeeper.eq.2
> ----------------
>
> --
> Tad McClellan
> email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
Thanks a lot