kaka_2 has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I read a file and grep for keyword and string resulted line in array. so far so good. Now from this line i want to take out values between "" which does not work.
my $file = "/tmp/test.xml"; open (INFILE, "<$file"); my @FiTime = grep {/SentTime/} (<INFILE>); Print "\n***** @FiTime";
This returns <SentTime v="2013-10-21T07:54:21z">
now i add following line of code my @ActTime = split (/(^".*")/, @FiTime);but this does not return 2013-10-21T07:54:21z, it return only 1.
could some tell me what wrong i am doing?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Extract value between quotes
by hdb (Monsignor) on Oct 21, 2013 at 13:54 UTC | |
by kaka_2 (Sexton) on Oct 21, 2013 at 16:27 UTC | |
by Athanasius (Archbishop) on Oct 22, 2013 at 06:51 UTC |