1

perl dot escaping issue

view story
linux-howto

http://www.unix.com – Hello, I'm trying to figure out why this perl command does not work. I want to split a string on dot delimiter. If I try with colon the result is fine: Code: > echo -n "hello:world" | perl -F/:/ -ane 'print "$F[1]\n"' >world As expected I get the good result, but by typing: Code: > echo -n "hello.world" | perl -F/./ -ane 'print "$F[1]\n"' > (nothing) I get an empty line. I tried by escaping the dot by using : Code: > echo -n "hello.world" | perl -F/\./ -ane 'print "$F[1]\n"' > (nothing) but I (HowTos)