The old 'lsil.com' email address will stop working after Jan 15,
> 2007. Please update your address book and distribution lists
> accordingly. Thank you.
>
> -Original Message-
> From: Gerald Host [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 19, 2006 3:35 PM
>
e old 'lsil.com' email address will stop working after Jan 15,
2007. Please update your address book and distribution lists
accordingly. Thank you.
-Original Message-
From: Gerald Host [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 19, 2006 3:35 PM
To: Perl List
Subject: reading a file
o: Perl List
Subject: reading a file
I'm trying to read a text file line-by-line.
open IN, shift;
my @lines=split("\n",);
foreach my $line (@lines) {
print OUT "QQQ $line QQQ\n";
A Divendres 20 Octubre 2006 00:34, Gerald Host va escriure:
> I'm trying to read a text file line-by-line.
>
> open IN, shift;
> my @lines=split("\n",);
> foreach my $line (@lines) {
> print OUT "QQQ $line QQQ\n
From: "Gerald Host" <[EMAIL PROTECTED]>
> I'm trying to read a text file line-by-line.
>
> open IN, shift;
> my @lines=split("\n",);
Did you ever read the docs???
my @lines=;
The <> operator returns the list of lines in the file if called in
the
date your address book and distribution lists
accordingly. Thank you.
-Original Message-
From: Gerald Host [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 19, 2006 3:35 PM
To: Perl List
Subject: reading a file
I'm trying to read a text file line-by-line.
open IN, shift
I'm trying to read a text file line-by-line.
open IN, shift;
my @lines=split("\n",);
foreach my $line (@lines) {
print OUT "QQQ $line QQQ\n";
}
The problem is that it always gives me th
Nick Drage wrote:
>
> On Tue, Mar 04, 2003 at 11:24:55AM -, Rob Dixon wrote:
>
> > > @rgstr=;
> >
> > This puts the <> operator into list context, so it will read
> > all of the file, placing separate records into consecutive
> > elements of the array. If this is what you want to do, then
> >
On Tue, Mar 04, 2003 at 11:24:55AM -, Rob Dixon wrote:
> > @rgstr=;
>
> This puts the <> operator into list context, so it will read
> all of the file, placing separate records into consecutive
> elements of the array. If this is what you want to do, then
> you have finished with the file a
Hi Diego
Diego Aguirre wrote:
> Hello,
> I have just learned opening and reading a file, with
>
> open (HoyIn,"File.txt");
Filehandles are traditionally all upper case, as:
open (HOYIN, "File.txt");
> @rgstr=;
This puts the <> operator into list
Diego Aguirre wrote:
>
> Hello,
Hello,
> I have just learned opening and reading a file, with
>
> open (HoyIn,"File.txt");
What would happen if for some reason the file could not be opened? You
should ALWAYS verify that the file opened correctly.
> @rgst
Hello,
I have just learned opening and reading a file, with
open (HoyIn,"File.txt");
@rgstr=;
foreach $linea (@rgstr)
{
print $linea ;
}
close (HoyIn);
I want read the file from -lets say- the fifth line on. Any help, pls?
Forhp Shiottr J.
my $get_case_text = $dbh->prepare("
> SELECT
> a.sr_num sr_num,
> a.sr_title sr_title,
> a.sr_stat_id sr_stst_id
> FROM
> s_srv_req
sr_stst_id
FROM
s_srv_req a
WHERE sr_num = ?");
$get_case_text->execute($sr_num) || $dbh->errstr;
($sr_num,$sr_title,$sr_stat_id) = $get_case_text->fetchrow_array();
$get_case_text->finish;
}
ETC..
On Thu, 2002-05-30 at 14:29, Lance Prais wrote:
> Janek,
> I tried that originally with the same results. I am perplexed to why this
> is happening, anyone have any ideas?
>
>
> Thanks
> Lance
>
Try this. I have no idea why it would work and the other wouldn't, but
it is worth a try.
reading a file and passing a variable
Lance Prais wrote at Thu, 30 May 2002 01:47:34 +0200:
Perhaps you missed to chomp th $ln.
So $ln = "1-294613112\n" what is perhaps not what you wanted.
> This is the most bizarre thing I have ever seen. I am using the following
code: There is
&g
Lance Prais wrote at Thu, 30 May 2002 01:47:34 +0200:
Perhaps you missed to chomp th $ln.
So $ln = "1-294613112\n" what is perhaps not what you wanted.
> This is the most bizarre thing I have ever seen. I am using the following code:
>There is
> absolutely no reason why this should not return
inish;
print "--> SR(bulk): $case->{sr_num}\n";
print "--> User Id(name): $case->{sr_title}\n";
$line++;
}
close(BULK);
$dbh->disconnect;
-Original Message-
From: Chas Owens [mailto:[EMAIL PROTECTED]]
Sent: We
t; Thanks
> Lance
>
> -Original Message-
> From: Chas Owens [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 29, 2002 4:11 PM
> To: Lance Prais
> Cc: Perl
> Subject: RE: Problem reading a file and passing a variable
>
> On Wed, 2002-05-29 at 17:05, Lance Pra
Wednesday, May 29, 2002 4:11 PM
To: Lance Prais
Cc: Perl
Subject: RE: Problem reading a file and passing a variable
On Wed, 2002-05-29 at 17:05, Lance Prais wrote:
> [Chas],
> Thank you, you made me realize the value of indention like never before.
> In the past I used the "=?&quo
On Wed, 2002-05-29 at 17:05, Lance Prais wrote:
> [Chas],
> Thank you, you made me realize the value of indention like never before.
> In the past I used the "=?" to return results form the query but in this
> case when I used in and run this script it does not error out but instead
> the query
On Wed, 2002-05-29 at 16:13, Lance Prais wrote:
> I am m using the following code to read from a .txt file. I am running into
> a problem that I am not sure why it is happening.
> The problem is when I run this script the SQL is not reading the variable.
> I am testing to make sure the .txt file
on Wed, 29 May 2002 20:13:13 GMT, Lance Prais wrote:
There is no need to post your message three times in less than 10 minutes.
> while( my $ln = )
> {
> chomp($ln);
> #use the items of the
> my $get_case_text = $dbh->prepare("SELECT a.sr_num ,b.name ,b.loc
> ,a.sr_title,f.mid_name ,
I am m using the following code to read from a .txt file. I am running into
a problem that I am not sure why it is happening.
The problem is when I run this script the SQL is not reading the variable.
I am testing to make sure the .txt file contains data and it does.
I get the following error:
D
I am m using the following code to read from a .txt file. I am running into
a problem that I am not sure why it is happening.
The problem is when I run this script the SQL is not reading the variable.
I am testing to make sure the .txt file contains data and it does.
I get the following error:
D
I am m using the following code to read from a .txt file. I am running into
a problem that I am not sure why it is happening.
The problem is when I run this script the SQL is not reading the variable.
I am testing to make sure the .txt file contains data and it does.
I get the following error:
D
can anybody help me out on how to read in the text files say xyz.txt which
is in a path
/mnt/diskf/stu/tmp/sis into a hash ? anyone please
**Sriram.R**
**Sriram.R**
_
Chat with friends online, try MSN Messenger: http://me
There's a simpler way, if you specify the file from the command line (as in
script.pl file) you can do
while (<>) {
last if /search test/;
#do something
}
in fact, you can make a cat-like script like this:
while (<>) {
print;
}
<> is the diamond operator, and it's the filehandle fo
Jon Serra wrote:
>
> Greetings, I am trying to read a text file into a scalar variable line by line
> until EOF or a search test if fullfilled. I have been reading files in like
> this:
>
> chomp (@line = `cat filename`);
>
> I do not want to do this beacuse my file is quite large, and there
#x27;s it. Somebody correct me if I'm wrong.
-Original Message-
From: Jon Serra [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 11:58 AM
To: [EMAIL PROTECTED]
Subject: reading a file line by line
Greetings, I am trying to read a text file into a scalar variable lin
On Wed, 27 Feb 2002, Jon Serra wrote:
> Greetings, I am trying to read a text file into a scalar variable line by line
> until EOF or a search test if fullfilled. I have been reading files in like
> this:
>
> chomp (@line = `cat filename`);
>
> I do not want to do this beacuse my file is quite
Greetings, I am trying to read a text file into a scalar variable line by line
until EOF or a search test if fullfilled. I have been reading files in like
this:
chomp (@line = `cat filename`);
I do not want to do this beacuse my file is quite large, and there is no reason
to hog the memory
Nestor Florez wrote:
> Hi there,
>
> I am trying to read a file and find the last numeric value in the line read.
> example:
> 123 45 -23 56 <-3.45
> 145 555 112 -12.0 -2.55
>
> all of the values are separated by a space and I am looking for the last
> value.
> I tried
If you know that the valu
tch the end of the string, so the match found must appear at the end of
the string of data. This is probably where you were going wrong before.
HTH
John
-Original Message-
From: Nestor Florez [mailto:[EMAIL PROTECTED]]
Sent: 04 January 2002 02:26
To: [EMAIL PROTECTED]
Subject: HELP - fi
Hi there,
I am trying to read a file and find the last numeric value in the line read.
example:
123 45 -23 56 <-3.45
145 555 112 -12.0 -2.55
all of the values are separated by a space and I am looking for the last
value.
I tried
$_ = s/[-][0-9].+$/$1/;
$number = $1;
The problem is that, not a
On Wed, 29 Aug 2001, Ken Hammer wrote:
> I'm attempting to write a perl script, that will
> read a file from a remote host. It must be done
> through SSL. I was looking into the possibility
> of using sockets (IO::Socket::INET), or some
> such animal to accomplish this task.
> First, is it poss
Hi All,
I'm attempting to write a perl script, that will
read a file from a remote host. It must be done
through SSL. I was looking into the possibility
of using sockets (IO::Socket::INET), or some
such animal to accomplish this task.
First, is it possible to connect using
sockets to a SSL por
37 matches
Mail list logo