in reply to Nested search and print

I just want print out the task.name and task.modifiedtime from $msl variable , what are the possible ways in perl ?
I assume "modifiedtime" is a typo and you really meant "lastmodifiedtime". One way is to use regular expressions to capture just the info you desire:
use strict; use warnings; my $msl = ' task.start # task.id: 1 task.name:"abc" task.info: xyz task.schedule: task.notify: task.nextruntime: task.lastmodifiedtime: 2010-04-12T11:57:56+01:00 by user1@server1 '; my ($name) = $msl =~ /task\.name:(.*)/; print "$name\n"; my ($time) = $msl =~ /task\.lastmodifiedtime:(.*)/; print "$time\n"; __END__ "abc" 2010-04-12T11:57:56+01:00 by user1@server1