On Thu, 11 Nov 2004 10:37:10 +0000, I H H wrote:
> Division operator in string context would be like 'split':
>
> @cols=split(/$expression/,$line); <=> @cols=$line/$expression;
That would fail when you need to evaluate this expression, for instance;
"100" / "10"
Do you want to split on '10', or do you want to divide by ten? I think
'split()' is nice as it is.
> open(F,$file);
> @lines=<F>;
> close(F);
>
> <=>
>
> @lines<$file>\o /\n;
You could always have a "Misc" module in hand, as I do;
my @lines = read_file( $file );
One other approach is to write a filter (using one of the Filter modules)
to do what you want.
> anyone else having crazy ideas like these?
All the time, but I tend to keep them for myself. I don't want one those
white, long-sleeved shirts.
--
Tore Aursand <>
"To cease smoking is the easiset thing I ever did. I ought to know,
I've done it a thousand times." (Mark Twain)