Loop through scalar?
From: Jason Kinkade (jkinkade_at_datashelter.net)
Date: 09/28/04
- Next message: Anno Siegel: "Re: Loop through scalar?"
- Previous message: Joe Smith: "Re: process control"
- Next in thread: Anno Siegel: "Re: Loop through scalar?"
- Reply: Anno Siegel: "Re: Loop through scalar?"
- Reply: Jürgen Exner: "Re: Loop through scalar?"
- Reply: Joe Smith: "Re: Loop through scalar?"
- Reply: Abigail: "Re: Loop through scalar?"
- Reply: Michele Dondi: "Re: Loop through scalar?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Sep 2004 00:02:16 -0700
I have a scalar/variable ($var) that looks like:
Line1
Line2
Line3
Line4
etc.
Theres obviously a new line after each Line#. I would like to loop
through this variable line by line with something like
foreach ($var)
{
print "Current Line: $_";
}
This reads the entire $var in. I want it line by line instead.
Any idea?
Thanks.
- Next message: Anno Siegel: "Re: Loop through scalar?"
- Previous message: Joe Smith: "Re: process control"
- Next in thread: Anno Siegel: "Re: Loop through scalar?"
- Reply: Anno Siegel: "Re: Loop through scalar?"
- Reply: Jürgen Exner: "Re: Loop through scalar?"
- Reply: Joe Smith: "Re: Loop through scalar?"
- Reply: Abigail: "Re: Loop through scalar?"
- Reply: Michele Dondi: "Re: Loop through scalar?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|