On Fri, Mar 24, 2017 at 8:16 PM, Darren Duncan <dar...@darrenduncan.net> wrote: > Just speculating, but try replacing the "||" with the "|" operator which > should create an ANY Junction, if I'm not mistaken, which may then do what > you want. -- Darren Duncan >
All of these should work if $Terminal ~~ /xterm/ | /linux/ {} if $Terminal ~~ /xterm | linux/ {} if $Terminal ~~ /xterm || linux/ {} Note that | in a regex tries both sides as if in parallel, and goes for the longest, while || tries the left side first, then the right side. Basically use | in regexes unless you need ||. > > On 2017-03-24 5:58 PM, ToddAndMargo wrote: >> >> Hi All,, >> >> if $Terminal ~~ /xterm/ || /linux/ {} >> does not work >> >> But this does >> if $Terminal ~~ /xterm/ || $Terminal ~~ /linux/ {} >> >> Can the if statement be shortened such that I do not >> have to repeat $Terminal? >> >> >> Many thanks, >> -T >> >