Alaric Joseph Hammell wrote at Wed, 05 Jun 2002 20:47:55 +0200:
> Hello,
> I am new with perl and was hoping to get some direction.
>
> I am attempting to parse a the attached .txt file.
>
> i need to be able to access the information by unique keys, QUAD_NAME and
>USGS_QD_ID. Also, I wan
> -Original Message-
> From: Jonathan E. Paton [mailto:[EMAIL PROTECTED]]
>
>
> --- "Jackson, Harry" <[EMAIL PROTECTED]> wrote: >
> > I have been looking back at this problem and here is what I
> have found.
> >
> > Lets take the following set of times
> > A , B
> > 1 (4 ,
From: drieux <[EMAIL PROTECTED]>
> On Wednesday, June 5, 2002, at 03:05 , Jenda Krynicky wrote:
>
> > From:"siren jones" <[EMAIL PROTECTED]>
> >> I'm trying to figure out some cgi code which has the statment
> >>
> >> &readparse(*input);
> [..]
> > What is it? A clear hint that the code was writt
Hello everyone,
I am planning to write perl programs to access Oracle database. What do I
need to install and configure in Solaris 2.6 environment with Oracle 8i.?
Where can I find some basic tutorials for beginners like my self.
Any pointers will be appreciated.
Thanks
Hello David,
Wednesday, June 5, 2002, 12:36:53 PM, you wrote:
>> start while you're waiting. The O'Reilly book "Learning Perl" is also
>> good, if you're into paper instead of pixels.
Are there any brand new books covering recent computing?
--
Adam V.
--
To unsubscribe, e-mail: [EMAIL PR
> -Original Message-
> From: Naser Ali [mailto:[EMAIL PROTECTED]]
>
>
> Hello everyone,
>
> I am planning to write perl programs to access Oracle
> database. What do I
> need to install and configure in Solaris 2.6 environment with
> Oracle 8i.?
> Where can I find some basic tutoria
Adam, et al --
...and then Adam Vardy said...
%
% Hello David,
Hello!
%
% Wednesday, June 5, 2002, 12:36:53 PM, you wrote:
%
% >> start while you're waiting. The O'Reilly book "Learning Perl" is also
% >> good, if you're into paper instead of pixels.
%
% Are there any brand new books cove
On Thu, Jun 06, 2002 at 08:34:24AM -0400, Naser Ali wrote:
> Hello everyone,
>
> I am planning to write perl programs to access Oracle database. What do I
> need to install and configure in Solaris 2.6 environment with Oracle 8i.?
> Where can I find some basic tutorials for beginners like my self
Hi,
I am struggling with something very stupid.
I know the print syntax, but I would like to use the "print <
like this
print < -Original Message-
> From: David vd Geer Inhuur tbv IPlib
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 9:20 AM
> To: [EMAIL PROTECTED]
> Subject: print
>
>
>
> Hi,
>
> I am struggling with something very stupid.
> I know the print syntax, but I would
Date sent: Thu, 6 Jun 2002 15:19:48 +0200 (METDST)
From: David vd Geer Inhuur tbv IPlib <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject:print
>
> Hi,
>
> I am struggling with something very stupid.
> I know the print syntax, b
Forgot to meantion where the docs are:
perldoc perlfaq4(search for 'Why don't my < -Original Message-
> From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 9:24 AM
> To: 'David vd Geer Inhuur tbv IPlib'; [EMAIL PROTECTED]
> Subject: RE: print
>
>
> like
On Thursday, June 6, 2002, at 04:35 , Jenda Krynicky wrote:
[..]
>
> P.S.: It's not just the *input why I said it was a Perl4 code. It was
> also the & and besides the readparse() is part of the old cgi-lib.pl
> library.
ah, I see, sorta like when they had that episode
of Star Track the Next In
On Thursday, June 6, 2002, at 06:19 , David vd Geer Inhuur tbv IPlib wrote:
>
> Exa:
>
> print <
> All these lines
> will have to be
> printed
> until I give an:
>
> EOF
>
cf
perldoc -q "Why don't my <
On Thursday, June 6, 2002, at 06:31 , Camilo Gonzalez wrote:
[..]
> Since this is a list for newbies, can you please be a bit more specific
> why
> you are opposed to those things you list. I'm quite fond of using the &foo
> or &foo(args) calling styles. Is this just a personal preference?
>
[..
Hello all,
First of all, this is a strange request for a script, but should be very simple, but I
can't get the code to cooperate.
What I need is for a script (when run) to open a specified file and comment out a
certain line of code. This script will be run via a cron job late at night.
The
On Jun 6, Kevin Old said:
>What I need is for a script (when run) to open a specified file and
>comment out a certain line of code. This script will be run via a cron
>job late at night.
Why use a regex for this? If you're checking for STRING EQUALITY, you
should use the 'eq' operator.
whil
Hey all,
Okay.. I am stumped. I must be doing something wrong. I am going to post
only the relevant code, let me know if you need more.
# $FUNC is a ref to a hash
## in a subroutine
foreach my $function (keys %{$FUNC}){
my @called_funcs;
# populate @called_funcs;
push @{
Thanx, Jenda and Japhy.
Damn... I put it as @{ $FUNC{$pkg_func} } but strict complained about it not
being declared.
I see now that I need the -> arrow.
So when is it safe to say stuff like
$$ref
@$ref
??
I have used it with
$$onediminsional_hash_ref{$key}
@$onediminsional_array_ref[$index]
On Jun 6, Nikola Janceski said:
>$$onediminsional_hash_ref{$key}
>@$onediminsional_array_ref[$index]
The leading sigil denotes the amount of stuff being returned, NOT the data
structure being worked with! It is the {} and [] that determine the data
structure.
@ARRAY = (1 .. 10);
$x = \@ARR
One last question:
is there a difference between:
@{ $HASH{$key} } = @array;
$HASH{$key} = \@array;
??
I really appreciate the references lesson! 8^)
- Nik
The views and opinions expressed in th
Hey!
Thanks to all of those who responded to my two latest questions. It helped
emensly!
I soon hope to contribute more to the list as well (in the form of answers,
even!).
Thanks again!
-James
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Jun 6, Nikola Janceski said:
>is there a difference between:
>
>@{ $HASH{$key} } = @array;
>$HASH{$key} = \@array;
Yes. The first overwrites everything currently contained in the array
reference $HASH{$key}; the second merely creates a new array reference,
and binds it @array.
Watch:
my
I came across a reference to lvalue(s) in
perldoc -f substr
I then searched perldoc for "lvalue", and looked at each reference in:
perldoc perldiag
perldoc perltoc
perldoc perlfunc
perldoc perlsub
perldoc perlop
perldoc perlguts
perldoc perlsyn
perldoc perlfaq7
perldo
It is the left side of an an equation(ie, lvalue operator rvalue)
lvalue is for left value and rvalue would be for the right value.
substr($name, 4) = 'dy';
substr($name,4) is an lvalue.
Wags ;)
-Original Message-
From: Mark Anderson [mailto:[EMAIL PROTECTED]]
S
It's me again with more wacky code requests,
I have the following line:
my $html_funcs = join "\n", ( $pkg_func, @{$TT->{ $pkg_func }} );
but sometimes the hash ref $TT doesn't have $pkg_func as a key and I get:
Can't use an undefined value as an ARRAY reference at
/u/njancesk/script/newscopei
Hi all-
I'm relatively new to perl and I don't know much about which modules might
be helpful--I was hoping some of you might have suggestions.
Basically, I want to write automated scripts that deal with web-interfaces.
For example, I want to be able to input data into web-forms, submit web
form
Ruth --
...and then Craig, Ruth said...
%
% Hi all-
Hello!
%
% I'm relatively new to perl and I don't know much about which modules might
% be helpful--I was hoping some of you might have suggestions.
I'm pretty junior myself, but perhaps I can still contribute.
%
% Basically, I want to
On Jun 6, Nikola Janceski said:
>my $html_funcs = join "\n", ( $pkg_func, @{$TT->{ $pkg_func }} );
>
>but sometimes the hash ref $TT doesn't have $pkg_func as a key and I get:
my $html_funcs = join "\n", (
$pkg_func,
@{ $TT->{$pkg_func} || [] },
);
--
Jeff "japhy" Pinyan [EMAI
I'm starting to get this...
A couple more questions:
1. What is a sigil?
2. I like to make little reference pages for myself, do these terms look
right?
# pointers are scalars
# GETTING POINTERS
\$mystring; # returns a pointer to mystring
\@myarray;# returns a pointer to myar
On Jun 6, Bryan R Harris said:
>1. What is a sigil?
Consult your nearest dictionary. Sigil == symbol.
>2. I like to make little reference pages for myself, do these terms look
>right?
I'd suggest scouring perlreftut and perlref.
># GETTING POINTERS
Stop using the word "pointer" right now.
Just a quick question, because I'm not sure what you mean here:
"If $x = \\"bar",
then $$x returns a reference (to "bar") which is a scalar, but certainly
NOT a string."
How is "bar" not a string?
-Original Message-
From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
Sent: Thursday,
On Jun 6, Timothy Johnson said:
>"If $x = \\"bar",
>then $$x returns a reference (to "bar") which is a scalar, but certainly
>NOT a string."
>
>How is "bar" not a string?
You've misparsed my use of parentheses here.
If $x = \\"bar", then $$x returns a reference which is a scalar, but
cert
Hi!
I am not sure on how to do this, but I am sure if there is a way, Perl can
do it!
%T_MODLUES = (
A1 => [ qw/ A B C D E F/ ],
A2 => [ qw/ A B C D E F/ ],
A3 => [ qw/ A B
Jerry --
...and then Jerry Preston said...
%
% Hi!
Hello!
%
% I am not sure on how to do this, but I am sure if there is a way, Perl can
% do it!
%
% %T_MODLUES = (
% A1 => [ qw/ A B C D E F/ ],
% A2 => [ qw/ A B C D E F/ ]
On Jun 6, Jerry Preston said:
> %T_MODLUES = (
> A1 => [ qw/ A B C D E F/ ],
> A2 => [ qw/ A B C D E F/ ],
> A3 => [ qw/ A B C D E F/ ],
> N => [ qw/ A1 A2 A3/],
>
On Jun 6, Jeff 'japhy' Pinyan said:
>On Jun 6, Jerry Preston said:
>
>> %T_MODLUES = (
>> A1 => [ qw/ A B C D E F/ ],
>> A2 => [ qw/ A B C D E F/ ],
>> A3 => [ qw/ A B C D E F/ ],
>>
Ok. Tim would have got it, but the Tim interpreter, tim, still has some
bugs to work out.
-Original Message-
From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 12:56 PM
To: Timothy Johnson
Cc: Bryan R Harris; [EMAIL PROTECTED]
Subject: RE: references and
Hi guys,
I will have the file that will start with the
following line:
Dear Name (ID12345)
Do you know how can I parse the above file, so I can
retrieve the ID12345?
idNumber = ID12345?
Thanks a lot!
__
Do You Yahoo!?
Yahoo!
On Jun 6, lz said:
>I will have the file that will start with the
>following line:
>
>Dear Name (ID12345)
>
>
>
>
>Do you know how can I parse the above file, so I can
>retrieve the ID12345?
Open the file, read the first line, and use the following regex:
($id) = $line =~ /\(
Jeff,
Here is a line from my file:
Dear Test Test1(ID127158),
.
I use the following line, when I am reading the file:
($idNumber) = $line =~ /\((ID\d+)\)/;
For, some reasons idNumber is still empty
Thanks again!
--- Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote:
> On Jun 6,
Leon --
...and then lz said...
%
...
% Here is a line from my file:
% Dear Test Test1(ID127158),
...
%
% I use the following line, when I am reading the file:
% ($idNumber) = $line =~ /\((ID\d+)\)/;
%
% For, some reasons idNumber is still empty
Do you actually read the line into $line? M
Hi David,
I do set the line, and thats why I am not sure, why it
doesn't work:
while ( $line = )
{
$idNumber = $line =~ /\((ID\d+)\)/;
}
print $idNumber; // empty
Thanks again!
--- David T-G <[EMAIL PROTECTED]>
wrote:
> Leon --
>
> ...and then lz said...
> %
> ...
> % Here is a line fr
Do you have multiple lines coming to STDIN? If so, then your $idNumber is
probably getting blown away when the regex doesn't match later in the file.
If you only want the first line of the file, then remove the while.
If you have multiple lines that will match, you'll need a different
structure,
Leon --
...and then lz said...
%
% Hi David,
Hello!
%
% I do set the line, and thats why I am not sure, why it
% doesn't work:
%
% while ( $line = )
% {
% $idNumber = $line =~ /\((ID\d+)\)/;
% }
%
% print $idNumber; // empty
Very odd indeed. I rewrote my one-liner in your format an
Mark Anderson wrote:
>
> I came across a reference to lvalue(s) in
>perldoc -f substr
> I then searched perldoc for "lvalue", and looked at each reference in:
>perldoc perldiag
>perldoc perltoc
>perldoc perlfunc
>perldoc perlsub
>perldoc perlop
>perldoc perlguts
>p
Hi guys,
Thanks a lot!
You were right - I got multiple lines in the file and
I guess while the variable was set when it found the
correct pattern, but was unset after it couldn't find
the pattern.
Since, I don't need anything after I got my field, I
just used 'last' to exit out from the loop an
Lz wrote:
>
> I do set the line, and thats why I am not sure, why it
> doesn't work:
>
> while ( $line = )
> {
> $idNumber = $line =~ /\((ID\d+)\)/;
You _need_ the parenthesis around $idNumber for it to work properly.
($idNumber) = $line =~ /\((ID\d+)\)/;
> }
>
> print $idNumber; //
Mark Anderson wrote at Thu, 06 Jun 2002 18:48:32 +0200:
> I came across a reference to lvalue(s) in
>perldoc -f substr
> I then searched perldoc for "lvalue", and looked at each reference in:
>perldoc perldiag
>perldoc perltoc
>perldoc perlfunc
>perldoc perlsub
>perldoc pe
On Thursday, June 6, 2002, at 01:56 , lz wrote:
>
> You were right - I got multiple lines in the file and
> I guess while the variable was set when it found the
> correct pattern, but was unset after it couldn't find
> the pattern.
>
> Since, I don't need anything after I got my field, I
> just u
On Thursday, June 6, 2002, at 01:07 , Jeff 'japhy' Pinyan wrote:
[..]
> Oops! That one is NOT for copies -- the makes all three point to the same
> array reference, and it's probably the most convenient way to do it.
[..]
ok, I'm gonna skip over the WHY part of the question
thank Japhy for
At 09:48 AM 6/6/02 -0700, Mark Anderson wrote:
>I came across a reference to lvalue(s) in
>perldoc -f substr
>I then searched perldoc for "lvalue", and looked at each reference in:
>perldoc perldiag
>perldoc perltoc
>perldoc perlfunc
>perldoc perlsub
>perldoc perlop
>pe
Thanks, Jeff.
Now I understand why I thought the Perl compiler was excessively chatty.
=)
- B
__
On Jun 6, Bryan R Harris said:
>1. What is a sigil?
Consult your nearest dictionary. Sigil == symbol.
>2. I like to make little reference pages for myself, do these terms lo
Could someone enlighten me on when it is necessary to chomp an array. It
seems when i write scripts that have a foreach or a while to iterate through
an array sometimes the chomp is necessary and sometimes it is not.
Thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
At 22:11 2002.06.06, Kipp, James wrote:
>Could someone enlighten me on when it is necessary to chomp an array. It
>seems when i write scripts that have a foreach or a while to iterate through
>an array sometimes the chomp is necessary and sometimes it is not.
>
>Thanks
chomp remove line ending c
ok, but I just dealing with arrays generated in my script(s). I am not
reading from any files. Yet one of the arrays that i was iterating thru and
running an operation on failed until i added chomp. but on a similar array
it did not need it
Thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED
--- "Kipp, James" <[EMAIL PROTECTED]> wrote:
> Could someone enlighten me on when it is necessary
> to chomp an array. It seems when i write scripts
> that have a foreach or a while to iterate through
> an array sometimes the chomp is necessary and
> sometimes it is not.
chomp(@array); # What
57 matches
Mail list logo