: my @sections = split /\n(?=[a-z])/i, $dat;
: I have a doubt here. perldoc -f split says,
: --
: If the PATTERN contains parentheses, additional array
: elements are created from each matching substring in the
: delimiter.
:
: split(
hankar C.P" <[EMAIL PROTECTED]>
cc: [EMAIL PROTECTED]
Subject:Re: Breaking up a file.
--- "Tirthankar C.P" <[EMAIL PROTECTED]> wrote:
>
> Folks, I have a file like this:
>
> Asea Brown Boveri Ltd.
> 02-Aug-1999 | 02-Aug-1999
#!/usr/bin/perl -w
use strict;
while (<>) # lines from stdout or files listed on command line
{ # are read one at a time and put into $_
/\|/ and print# print lines with '|' in them
or # only executed if previous expression
false
Many thanks to Paul. His solution works.
-tir
On Thu, 10 May 2001, Paul wrote:
>
> --- "Tirthankar C.P" <[EMAIL PROTECTED]> wrote:
> >
> > Folks, I have a file like this:
> >
> > Asea Brown Boveri Ltd.
> > 02-Aug-1999 | 02-Aug-1999 | 399.05
> > 03-Aug-1999 | 03-Aug-1999 | 395.00
>
--- "Tirthankar C.P" <[EMAIL PROTECTED]> wrote:
>
> Folks, I have a file like this:
>
> Asea Brown Boveri Ltd.
> 02-Aug-1999 | 02-Aug-1999 | 399.05
> 03-Aug-1999 | 03-Aug-1999 | 395.00
> 04-Aug-1999 | 04-Aug-1999 | 426.5
> 06-Aug-1999 | 06-Aug-1999 | 406.00
> 31-Jul-2000 | 31-
Folks, I have a file like this:
Asea Brown Boveri Ltd.
02-Aug-1999 | 02-Aug-1999 | 399.05
03-Aug-1999 | 03-Aug-1999 | 395.00
04-Aug-1999 | 04-Aug-1999 | 426.5
06-Aug-1999 | 06-Aug-1999 | 406.00
31-Jul-2000 | 31-Jul-2000 | 203.00
01-Aug-2000 | 01-Aug-2000 | 203.65
| Overa