perl programming questions

holycow

Senior member
Feb 28, 2001
330
0
0
hi,

i was doing a regexp on stripping off all the html codes on a webpage.. i couldn't strip this (<!-- asdf-->)html syntax properly.. can someone help me with this one?

also, can someone explain to me what does this code do exact? i understand that it's used to sort the array, but i don't understand why it convert the array into a hash, map it then sort it..

here is the perl code:
@list = sort keys %{{map{$_,1} @list}};

this is what i come up with, but it doesn't work when there are javascrpt embedded in the html comment syntax..

$s =~ s/(<!--(\W|\w)*(\/\/)?-->)//gi;

tia!