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