in reply to Re^4: get data from the database -CGI
in thread parsing a txt file

OK, from perlop:

If you don't want it to test the right operand till the next evaluation, as in sed, just use three dots ("...") instead of two. In all other regards, "..." behaves just like ".." does.

Not really sure what the difference is, so I'll stick with my normal two dot approach.

Replies are listed 'Best First'.
Re^6: get data from the database -CGI
by choroba (Cardinal) on Nov 10, 2010 at 11:10 UTC
    This is the difference:
    $ yes | nl | perl -ne 'print if /00/../0/' | head -n20 100 y 200 y 300 y 400 y 500 y 600 y 700 y 800 y 900 y 1000 y 1001 y 1002 y 1003 y 1004 y 1005 y 1006 y 1007 y 1008 y 1009 y 1100 y $ yes | nl | perl -ne 'print if /00/.../0/' | head -n20 100 y 101 y 200 y 201 y 300 y 301 y 400 y 401 y 500 y 501 y 600 y 601 y 700 y 701 y 800 y 801 y 900 y 901 y 1000 y 1001 y