--- Ryan <[EMAIL PROTECTED]> wrote:
> What is a lexical file handle? I'm working my way
> through Ford's "Perl
> Programming for the Absolute Beginner" (2007) and
> Lee's "Beginning Perl"
> (2004), and they both use the FH style of file
> handle.
>From perl 5.6 you can say,
open my $fh,"te
On 7/19/07, Ryan <[EMAIL PROTECTED]> wrote:
What is a lexical file handle? I'm working my way through Ford's "Perl
Programming for the Absolute Beginner" (2007) and Lee's "Beginning Perl"
(2004), and they both use the FH style of file handle. Should I do
differently?
snip
Yes, you should use
What is a lexical file handle? I'm working my way through Ford's "Perl
Programming for the Absolute Beginner" (2007) and Lee's "Beginning Perl"
(2004), and they both use the FH style of file handle. Should I do
differently?
Thanks.
--Chris
Chas Owens wrote:
On 7/19/07, [EMAIL PROTECTED] <
On 7/19/07, John W. Krahn <[EMAIL PROTECTED]> wrote:
Chas Owens wrote:
> On 7/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> On Jul 18, 6:16 am, [EMAIL PROTECTED] (Ayesha) wrote:
>> >
>> > when I use while($line1 = ){
>> >$line = ;
>> > }
>>
>
Chas Owens wrote:
On 7/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
On Jul 18, 6:16 am, [EMAIL PROTECTED] (Ayesha) wrote:
>
> when I use while($line1 = ){
>$line = ;
> }
while ($line=)
{
print"$line";
}
2. while ($line =
On 7/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
On Jul 18, 6:16 am, [EMAIL PROTECTED] (Ayesha) wrote:
> Hi all
>
> I got started on Perl only today!
> I have a text file in which I need to read a line and the line after
> that. Like
>
> line1 and line2
> line2 and line3
> line3 and line4
On Jul 18, 6:16 am, [EMAIL PROTECTED] (Ayesha) wrote:
> Hi all
>
> I got started on Perl only today!
> I have a text file in which I need to read a line and the line after
> that. Like
>
> line1 and line2
> line2 and line3
> line3 and line4
>
> when I use while($line1 = ){
>
Chas Owens wrote:
On 7/18/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote:
Hrm,
I am confused then:)
I have this as a file I am using right now!
while () {
my @data = split;
next unless @data == 3;
next if grep (/[^0-9.-]/, @data);
printf FILEOUT "X%s Y%s\n", $dat
On 7/18/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote:
Hrm,
I am confused then:)
I have this as a file I am using right now!
while () {
my @data = split;
next unless @data == 3;
next if grep (/[^0-9.-]/, @data);
printf FILEOUT "X%s Y%s\n", $data[0], $data[1];
uple of
coordinates and processes them perfectly? I also am just learning, so I am not
sure why I need to do more?
Thanks!
jlc
-Original Message-
From: Gary Stainburn [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 18, 2007 10:15 AM
To: beginners@perl.org
Subject: Re: Extreme beginner
On Wednesday 18 July 2007 17:08, Joseph L. Casale wrote:
> Is that true?
> I use while loops and they cycle through each line without me keeping
> track? jlc
Yeah, it's true. Why would you want to keep track?
(you can BTW, look at perldoc perlvar for $.)
in my code, the 1st line is written into $
--- Ayesha <[EMAIL PROTECTED]> wrote:
> Hi all
>
> I got started on Perl only today!
> I have a text file in which I need to read a line
> and the line after
> that. Like
>
> line1 and line2
> line2 and line3
> line3 and line4
>
> when I use while($line1 = ){
>$lin
On Wednesday 18 July 2007 06:16, Ayesha wrote:
> Hi all
>
> I got started on Perl only today!
> I have a text file in which I need to read a line and the line after
> that. Like
>
> line1 and line2
> line2 and line3
> line3 and line4
>
> when I use while($line1 = ){
>$l
Hi all
I got started on Perl only today!
I have a text file in which I need to read a line and the line after
that. Like
line1 and line2
line2 and line3
line3 and line4
when I use while($line1 = ){
$line = ;
}
I get output
line1 and line2
line3 and l
Mark Anderson wrote:
>
> #open FILE or die...
> my $location = ;
> my $format = ;
> my $cost = ;
> my $start = ;
> my $runby = ;
> my $prize = ;
>
> now you have each of the 6 lines in its own variable. You can then use the
> variables to lay out your HTML.
And of course you can put it all on
: Wednesday, April 03, 2002 1:26 PM
To: [EMAIL PROTECTED]
Subject: RE: Reading lines from a file
I have a six line file with base data in. I am trying to use that data
to create HTML code.
Data looks like
LOCATION
FORMAT
COST
START TIME
RUN BY
PRIZE
When I create the HTML some of these will be
into the correct part of the
HTML.
-Original Message-
From: Mark Anderson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 4:22 PM
To: Glenn Cannon; [EMAIL PROTECTED]
Subject: RE: Reading lines from a file
Specific by line number? specific by text in the line? specific as
line
-Original Message-
From: Glenn Cannon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 12:47 PM
To: [EMAIL PROTECTED]
Subject: Reading lines from a file
How do I read a specific line from a text file?
I know how to open and close the file, and how to read the entire file,
is there a
How do I read a specific line from a text file?
I know how to open and close the file, and how to read the entire file,
is there a way (maybe by setting $.) to read a specific line of the
file?
19 matches
Mail list logo