in reply to problem with a regex loop
Show us a code sample that we can run and that doesn't need anything outside the sample script. You may find Re^3: loop through file checking for session variable provides a useful starting point.
Use strictures (use strict; use warnings;).
if($Session->{'usrSystem'})=~/$line/g;
is not syntacticly correct. If it is intended as a statement modifier it needs a statement before the if. If it is an if it needs a block and the expression must be in parenthesis.
Use the three parameter open:
my $site_file = 'c:\sitefile.txt'; open my $Data, '<', $site_file or die "Horrible death";
|
|---|