[ubuntu-uk] Quick Perl question...

LeeGroups mailgroups at varga.co.uk
Mon Jul 12 21:12:50 BST 2010


I'm having a bit of an issue with a Perl script on my Ubuntu server at 
home (can you see what I did there :)...

The line in question is this...

$solar_info =~ s/<\/solar>.*/,/;   

 From my tinkerings, this should find the string </solar> in the string 
$solar_info, and then remove it and any number of following characters 
(the .*) and then replace them with a ",".
Except that it doesn't. It hacks out the </solar> and replaces it with a 
, but leaves the rest of the string intact... Much to my annoyance... :|

Any clues?

Cheers,
Lee




More information about the ubuntu-uk mailing list