RE: moving to the next line
From: Charles K. Clarkson (cclarkson_at_htcomp.net)
Date: 12/16/04
- Next message: JupiterHost.Net: "Re: adding functionality"
- Previous message: Matthias Kraatz: "How to detect present X-Server"
- In reply to: Christopher Spears: "moving to the next line"
- Next in thread: Chris Devers: "variable declaration, was RE: moving to the next line"
- Reply: Chris Devers: "variable declaration, was RE: moving to the next line"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: <beginners@perl.org> Date: Thu, 16 Dec 2004 00:02:34 -0600
Christopher Spears <cspears2002@yahoo.com> wrote:
: So everybody wants to know what I have been working
: on. I finally got permission to post this:
:
: #!/usr/bin/perl -w
: use strict;
:
: my $Pixarport = 7498;
: my $host = "lex";
: my $Pixarfile = $Pixarport."@".$host;
: my @line;
: my $line;
: my @features_array;
: my @handles_array;
: my $handles;
: my $features;
: my $sizeof;
: my $counter = 0;
: my $answer;
: my $string;
Don't declare all your variables at the beginning
of the script. It works in other languages, but not
in perl. Declare them as you go.
: LOOKING_LINES: while(@line = `cat clicenses_output`){
Stop using line labels. They work in perl, but they
are rarely needed.
[snip]
: This is the line giving me issues:
:
: LOOKING_HANDLES: while (@line = `cat
: clicenses_output`);
:
: Basically, after I grab $feature I need to move to the
: next element of the array @line and start looking at
: each element until I hit Users again (in which case I
: grab the feature and the process begins again). So
: how do I make the big jump to that next element?
Why is this output in a loop? Does `cat clicenses_output`
place a new array in @line each time through? Where does it
break its listing?
HTH,
Charles K. Clarkson
-- Mobile Homes Specialist 254 968-8328
- Next message: JupiterHost.Net: "Re: adding functionality"
- Previous message: Matthias Kraatz: "How to detect present X-Server"
- In reply to: Christopher Spears: "moving to the next line"
- Next in thread: Chris Devers: "variable declaration, was RE: moving to the next line"
- Reply: Chris Devers: "variable declaration, was RE: moving to the next line"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|