I have a file that contains the following...
hostMode=Standard
displayName=CL1-A-0
nickname=1A-G00
hostMode=Windows Extension
displayName=CL1-A-2
nickname=SERVER123_B20_S6_0
I have a perl script (Below) that reads the above file, and if it finds the instance of "hostMode=Standard" it prints it out, (this is just to prove my sytax works).
Expand|Select|Wrap|Line Numbers
- #!/usr/bin/perl
- open (FILE,"mp.txt") || die print "Can't Open File\n";
- while (<FILE>) {
- $_=~ s/^\s+//;
- if (/hostMode=Standard/) {print "$_";}
- }
- close (FILE);