Well, it ain't off-the-shelf Perl. Maybe you mean something like:
use strict; use warnings; my $sitelist = xmlFileData ("Content", "Sitelist.txt"); my $Session; my $str; while (<$sitelist>) { chomp; next unless /\Q$Session->{'usrSystem'}\E/; $str .= MLX40Tutorials (); }
However the code that you posted is so far from anything meaningful that it is pretty much impossible to decide just what you really want to happen.
I strongly recommend that you use strictures (use strict; use warnings;) which might at least make you focus a little on the scope of variables and where they get initialized.
Note that a straight character for character match is almost never what you want when processing XML. Perhaps you should tell us something about the bigger picture?
In reply to Re: loop through file checking for session variable
by GrandFather
in thread loop through file checking for session variable
by grashoper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |