Aug. 31st, 2011

ocehb: (Default)

zsh# print -l "AA BB" "test" "BB" | perl -lne 'print if (/AA/ .. /BB/)'
AA BB
zsh# print -l "AA BB" "test" "BB" | perl -lne 'print if (/AA/ ... /BB/)'
AA BB
test
BB
zsh#


разница только во времени вычисления правой части.

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

Profile

ocehb: (Default)
ocehb

January 2021

S M T W T F S
     12
345 6789
10111213141516
17181920212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 5th, 2026 01:51 pm
Powered by Dreamwidth Studios