$rowfetch =~ s/['-]//g; #All chars inside the [ ] will be filtered out.
$rowfetch =~ m/(\w+), ?(.)/;
printf $fh lc($2.$1);
I got help building this regular expression yesterday, but I don't fully understand it.
It takes a name like Parisi, Kenneth and prints out kparisi
Knowns:
s/ = substitute
m/ = match
I tried searching for the rest but couldn't find anything that really helped explain it.
I also didn't understand how the =~ is supposed to evaluate to either true or false, yet in this situation, it is modifying the string.
$rowfetch =~ s/(\w+),\s(\w)/$2$1/;
$rowfetch =~ s/([a-z]+)\s([a-z])/$2$1/i;
$rowfetch = lc $rowfetch; – CheeseConQueso Dec 19 '08 at 15:16
's i thought this took html... btw is there any way to send a message directly to someone on this site? im obviously new here – CheeseConQueso Dec 19 '08 at 15:16