![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reading specific contents from 1 input files and appending it to another input file | sksahu | Shell Programming and Scripting | 5 | 01-14-2009 06:09 AM |
| reading input from a file | nadbar | Shell Programming and Scripting | 2 | 01-07-2009 08:12 PM |
| Help reading an input file in KSH | zilla30066 | Shell Programming and Scripting | 2 | 02-01-2007 06:45 AM |
| Script for reading an input file | gzs553 | Shell Programming and Scripting | 1 | 10-17-2006 07:55 AM |
| Reading Input from File and Duplicates Output | noelcantona | Shell Programming and Scripting | 6 | 10-18-2005 05:59 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
perl how to exit a while loop and quit reading the input file
I am reading a file using While loop Code:
while <FILE>
{
$_ = <FILE>;
process data...
}
I would like to quit reading the file once I encounter a String pattern. How do i do it. is it Code:
if (/SUMMARY/)
{
last;
}
I am having problems with uninitialized value in pattern matching and substitution and the while Loop does not end. Don't know how to get around that either.. thanks Last edited by pludi; 4 Weeks Ago at 05:29 PM.. |
| Bookmarks |
| Tags |
| while loop error recursion |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|