Assuming it's OK for severity/modified to be blank, you can avoid the warning by changing that to
if ( $e->{severity} || '' =~ /High/
&& $e->{modified} || '' =~ /($today|$yesterday)/ )
{
or
if ( defined $e->{severity}
&& defined $e->{modified}
&& $e->{severity} =~ /High/
&& $e->{modified} =~ /($today|$yesterday)/ )
{
On the other hand, you might need to look at the source of your data and see about making a change there to ensure that severity and modified are set on all records if they're supposed to be required.
Either way, I would recommend making the behaviour consistent by adding use warnings right after use strict, so that they'll be on in both OSes, not by turning them off in Windows.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.