Re: Can this OR be shortened?

2017-03-24 Thread ToddAndMargo
On 03/24/2017 07:45 PM, Brad Gilbert wrote: 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, Hi Brad, What do y

Re: Can this OR be shortened?

2017-03-24 Thread ToddAndMargo
On 03/24/2017 08:36 PM, Timo Paulssen wrote: I seem to recall you asked about performance recently the regex engine has a significant overhead. Your regex is equivalent to $Terminal.contains('xterm' | 'linux') though of course if you only test this once at the beginning of the program, you

Re: Can this OR be shortened?

2017-03-24 Thread Timo Paulssen
I seem to recall you asked about performance recently the regex engine has a significant overhead. Your regex is equivalent to $Terminal.contains('xterm' | 'linux') though of course if you only test this once at the beginning of the program, you can ignore that.

Re: Can this OR be shortened?

2017-03-24 Thread Brad Gilbert
On Fri, Mar 24, 2017 at 8:16 PM, Darren Duncan 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/ | /lin

tip on using /etc/crontab

2017-03-24 Thread ToddAndMargo
Hi All, Fedora Core 25 (Linux) I just found out the hard way that if us use use Inline::Perl5; use Email::Simple:from; your program will run from the command line, but when run from /etc/crontab, your program will just disappear. Mind you I actually did not use this code, I just had

Re: Can this OR be shortened?

2017-03-24 Thread Darren Duncan
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 On 2017-03-24 5:58 PM, ToddAndMargo wrote: Hi All,, if $Terminal ~~ /xterm/ || /linux/ {} does not work But this does

Re: Can this OR be shortened?

2017-03-24 Thread ToddAndMargo
On 03/24/2017 06:14 PM, Brandon Allbery wrote: On Fri, Mar 24, 2017 at 8:58 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: if $Terminal ~~ /xterm/ || /linux/ {} if $Terminal ~~ /xterm || linux/ {} Perfect! Thank you! I keep forgetting spaces are ignored in regex's

Re: Can this OR be shortened?

2017-03-24 Thread Brandon Allbery
On Fri, Mar 24, 2017 at 8:58 PM, ToddAndMargo wrote: > if $Terminal ~~ /xterm/ || /linux/ {} if $Terminal ~~ /xterm || linux/ {} -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix,

Can this OR be shortened?

2017-03-24 Thread ToddAndMargo
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 -- ~~ Computers are like air condit