SPUG: mkfavhtm.pl -- Converting IE favorites to HTM (unix/mozilla users just ignore me)

Yitzchak Scott-Thoennes sthoenna at efn.org
Tue Jul 11 00:53:57 PDT 2006


On Mon, Jul 10, 2006 at 01:26:46PM -0700, John W. Krahn wrote:
> Aaron West wrote:
> > for ( sort keys %url ) {
> >     my ( $mtime, $url, $filename ) = split( "\x1c", $_ );
> 
> No need to remember the value of the $; variable, just use the $; variable
> directly:
> 
>      my ( $mtime, $url, $filename ) = split $;;

That may not fly if $; is modified (say, to "|"), so:

   my ( $mtime, $url, $filename ) = split /\Q$;/;

(Besides, I really dislike any code that helps people forget that
split's first arg is always a regex (except for the " " special
case) even without // or m.)


More information about the spug-list mailing list