2009/2/11 Dermot <[email protected]>: > Hi, > > Sorry if I am being a bore but I was curious, TrimEdges uses "$val =~ > s/\s+\z//;" to remove white-space from the end of a string. I can't > find a character class for \z. How does \z differ from $?
Don't be afraid to ask! :) \z isn't a character class: it's an anchor, and makes sure we're really at the end of the string. $ can match before a newline at the end of the string - which isn't usually what we want. According to `perldoc perlre`... $ Match the end of the line (or before newline at the end) \z Match only at end of string Cheers, Carl _______________________________________________ HTML-FormFu mailing list [email protected] http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
