[OT] escape a dot in perl

Mike Bird mgb-ubuntu at yosemite.net
Fri Nov 18 20:28:14 UTC 2005


On Fri, 2005-11-18 at 11:54, Thomas Kaiser (ubuntu) wrote:
> Why does
> @title = split ("\.\./", $line);
> and
> @title = split ("../", $line);
> give me the same results.

The first argument to split should be a pattern.  Either
of these should work:

  @title = split (/\.\.\//, $line);

  @title = split (m"\.\./", $line);

--Mike Bird





More information about the ubuntu-users mailing list