Link to home
Start Free TrialLog in
Avatar of Tolgar
Tolgar

asked on

How to assign to an array or variable and check the existance of a string in it?

Hi,

#returns an array of lines
$job->body; 

Open in new window


I want to assign the output of the previous line to a variable or array and then check if there is any line in the job body that has 'gMyFile' string in it.

How can I make it in Perl?

Thanks,



ASKER CERTIFIED SOLUTION
Avatar of wilcoxon
wilcoxon
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tolgar
Tolgar

ASKER

So how can say if matched then do something?

Thanks,
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial