On Thu, 2004-08-26 at 12:28, Etienne Ledoux wrote:
> Greetings,
>
> I have a program that does a search on a db and prints the output to the
> screen. If there is a lot of output how can I a stop/continue displaying it.
> like 'ls -l |more' would do. or anything |more for that matter.
>
> tx
>
On Thursday 26 August 2004 09:20, Ramprasad A Padmanabhan wrote:
> On Thu, 2004-08-26 at 12:28, Etienne Ledoux wrote:
> > Greetings,
> >
> > I have a program that does a search on a db and prints the output to the
> > screen. If there is a lot of output how can I a stop/continue displaying
> > it.
ok.
Here is the output I'm trying to '|more'
while (@ref = $sth->fetchrow_array()) {
print "Username: $ref[0], Password: $ref[1]\n";
}
I tried putting |more at various positions where I thought it might work. But
it doesn't work as expected.
On Thursday 26 August
I guess you should use the "|more" command
in the command prompt not inside the perl code itself.
perl code.pl |more
On Thu, 26 Aug 2004 09:36:38 +0200, Etienne Ledoux <[EMAIL PROTECTED]>
wrote:
ok.
Here is the output I'm trying to '|more'
while (@ref = $sth->fetchrow_array()) {
My program starts with a menu with options. That being one of the options to
choose from. Once it is done it returns to the main menu again so you can run
other options again. I would like to be able to do this within my program
somehow if possible. If not, I guess I could run it with |more from
On Thu, 2004-08-26 at 13:26, Etienne Ledoux wrote:
> My program starts with a menu with options. That being one of the options to
> choose from. Once it is done it returns to the main menu again so you can run
> other options again. I would like to be able to do this within my program
> somehow
On Wednesday, August 25, 2004 11:56 PM, balaji venkat wrote:
> The following code will do the required task.
>
> #! /usr/bin/perl
>
> open (FILE,"test789.pl");
> @array1 = ;
> $last = pop(@array1);
> print $last;
No, I don't think you read the requirement correctly.
Either solution from myself
Etienne Ledoux wrote:
Greetings,
Hello,
I have a program that does a search on a db and prints the output to the
screen. If there is a lot of output how can I a stop/continue displaying it.
like 'ls -l |more' would do. or anything |more for that matter.
perlopentut has an example using less inste
I have som strings that I want to clean up. They can contain digits,
some special characters (white space etc) and a comma and all I want to
keep is the digits and the comma? Any idea how I could do this?
/juman
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
juman said:
> I have som strings that I want to clean up. They can contain digits,
> some special characters (white space etc) and a comma and all I want to
> keep is the digits and the comma? Any idea how I could do this?
>
>From Learning Perl Chp9:
"9.6.1. Global Replacements with /g
As you ma
On Thu, Aug 26, 2004 at 12:06:57PM +0200, juman wrote:
> I have som strings that I want to clean up. They can contain digits,
> some special characters (white space etc) and a comma and all I want to
> keep is the digits and the comma? Any idea how I could do this?
What have you tried?
y/0-9,/
Juman wrote:
I have som strings that I want to clean up. They can contain
digits, some special characters (white space etc) and a comma and
all I want to keep is the digits and the comma? Any idea how I
could do this?
Use the s/// operator (explained in "perldoc perlop").
The PATTERN may consist of
Hello Perl Gurus,
Is there some way to set the special variable $/ to a regular expression
such as (.+?):(\d+):(.*)
I have tried:
local $/ =~ m/(.+?):(\d+):(.*)/; # But cannot change $/;
local $/= /(.+?):(\d+):(.*)/; # Use of uninitialized value in pattern
match m//.
I am trying to p
Thanks this solved it all and I learned a new Perl-thingy ;)
/juman
On Thu, Aug 26, 2004 at 12:22:04PM +0200, Paul Johnson wrote:
> On Thu, Aug 26, 2004 at 12:06:57PM +0200, juman wrote:
>
> > I have som strings that I want to clean up. They can contain digits,
> > some special characters (white
On Thu, Aug 26, 2004 at 12:35:25PM +0200, Denham Eva wrote:
> Is there some way to set the special variable $/ to a regular expression
> such as (.+?):(\d+):(.*)
>From perlvar:
Remember: the value of "$/" is a string, not a
regex. awk has to be better for something. :-)
I await the reply
Hi all.
I am having issues with extracting the Japanese data from a sql server with
a cgi-perl script , I have a sql 2000 server which does handel japanese
characters, the silly part is that i have iis5.something based on win 2k
english, but i could use asp to extract the japanese characterset by s
On Thu, 26 Aug 2004, Etienne Ledoux wrote:
Here is the output I'm trying to '|more'
while (@ref = $sth->fetchrow_array()) {
print "Username: $ref[0], Password: $ref[1]\n";
}
I tried putting |more at various positions where I thought it might
work. But it doesn't work as
Ok well sorry about that I must have missed your earlier post. Good luck
on the other module, it looked simpler to me.
Chris Hood
Investigator Verizon Global Security Operations Center
Email: [EMAIL PROTECTED]
Desk: 972.399.5900
Verizon Proprietary
NOTICE - This message and any atta
So that gives me the ASCII Value. But I am looking for the 1-for-1 value.
A = 1
B = 2
C = 3
AA = 27
AB = 28
As the columns in Excel is are labeled
So I have a Value at max row AN which is 40 Columns in the Excel Worksheet.
Using the below method gives me decimal value 104 which is 'H' and I
The following solution isn't as short as the other solutions, but it will
allow you to maintain the order of the original file:
#!/usr/bin/perl
use warnings;
use strict;
my($last, $last_rec);
while () {
my @data = split;
if ($last and $data[0] != $last) {
print $last_rec;
} elsif (eof)
[EMAIL PROTECTED] wrote:
Ok well sorry about that I must have missed your earlier post. Good luck
on the other module, it looked simpler to me.
Thanks, if I run into problems I'll be posting back :)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Etienne Ledoux wrote:
> Greetings,
>
> I have a program that does a search on a db and prints the output to
> the screen. If there is a lot of output how can I a stop/continue
> displaying it. like 'ls -l |more' would do. or anything |more for
> that matter.
Read perldoc perlopentut and search f
I'll bet there is a clever perl (ie 6 characters) way to do this, but
I've done it like this...
sub toLetter {
my $leftLetter = int($_[0]/26);
my $rightLetter = ($_[0] % 26) + 64;
if ($leftLetter>0) {
$leftLetter += 64;
return chr($leftLette
DiGregorio, Dave wrote:
> So that gives me the ASCII Value. But I am looking for the 1-for-1
> value. A = 1
> B = 2
> C = 3
>
> AA = 27
> AB = 28
>
> As the columns in Excel is are labeled
>
> So I have a Value at max row AN which is 40 Columns in the Excel
> Worksheet. Using the below meth
From: "JupiterHost.Net" <[EMAIL PROTECTED]>
> Jenda Krynicky wrote:
> > From: "JupiterHost.Net" <[EMAIL PROTECTED]>
> >
> >>Is there an easy way to view the POD from a local module in a
> >>browser to see what it will look like in CPAN?
> >
> >
> > I would generate the HTML file by the pod2html
Our fellow list member Denham wrote:
>Is there some way to set the special variable $/ to a regular expression
>such as (.+?):(\d+):(.*)
Well, man perlvar says:
perlvar> Remember: the value of $/ is a string, not a regexp.
perlvar> AWK has to be better for something :-)
>I am trying to process
Hi there,
I am getting this error while trying to configure
MCPAN, the error is as follow :
Trying with "/usr/sfw/bin/ncftpget" to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
ftp.perl.org: unknown host.
ncftpget: cannot open ftp.perl.org: unknown host.
Trying with "/usr/sfw/bin/ncftpget"
Hello,
When i try to configure the MCPAN i get this
error..:
rying with "/usr/sfw/bin/ncftpget" to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz
ftp.perl.org: unknown host.
ncftpget: cannot open ftp.perl.org: unknown host.
Trying with "/usr/sfw/bin/wget -O -" to get
ftp://ftp.perl.or
Hi
I have a list of dates that have been converted to epoch seconds, processed
and then converted back to a string (using timelocal). The resulting date
format is:-
"Wed Mar 16 22:10:16 2004"
What is the easiest way to convert this format (or epoch seconds) to
"16-Mar-2004 22:10" - preferrably u
Jenda Krynicky wrote:
From: "JupiterHost.Net" <[EMAIL PROTECTED]>
Jenda Krynicky wrote:
From: "JupiterHost.Net" <[EMAIL PROTECTED]>
Is there an easy way to view the POD from a local module in a
browser to see what it will look like in CPAN?
I would generate the HTML file by the pod2html script and
> Hi
>
> I have a list of dates that have been converted to epoch seconds,
processed
> and then converted back to a string (using timelocal). The resulting date
> format is:-
>
> "Wed Mar 16 22:10:16 2004"
>
> What is the easiest way to convert this format (or epoch seconds) to
> "16-Mar-2004 22
On Thu, 26 Aug 2004 09:45:57 -0700 (PDT)
Joe Echavarria <[EMAIL PROTECTED]> wrote:
>When i try to configure the MCPAN i get this
> error..:
> Connecting to ftp.perl.org:21...
> ftp.perl.org: Host not found
> Issuing "/usr/bin/ftp -n"
> ftp.perl.org: unknown host or invalid literal address
>
John Bruin wrote:
I have a list of dates that have been converted to epoch seconds,
processed and then converted back to a string (using timelocal).
The resulting date format is:-
"Wed Mar 16 22:10:16 2004"
What is the easiest way to convert this format (or epoch seconds)
to "16-Mar-2004 22:10" -
T
All,
I have a foreach statement that is going through a file and looking for
all line w/out *Orig and what I want to do is if its return code was 0
then print out a short message, but I do not want to print out this short
message more than n +1 times. Any ideas?
Here is my code:
foreach (s
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
: All,
:
: I have a foreach statement that is going through a file and
: looking for all line w/out *Orig and what I want to do is if
: its return code was 0 then print out a short message, but I do
: not want to print out this short message more than
yes i know what it means.., what ftp site of cpan i
can use ?
Thanks.
--- Owen <[EMAIL PROTECTED]> wrote:
> On Thu, 26 Aug 2004 09:45:57 -0700 (PDT)
> Joe Echavarria <[EMAIL PROTECTED]> wrote:
>
> >When i try to configure the MCPAN i get this
> > error..:
>
> > Connecting to ftp.perl.org:
Hi Wiggins and Gunnar
Thanks for your help. I come from an excel vba background where date
formatting is a simpler process. This is what I used:
$date_next_string = strftime("%d-%b-%Y %H:%M", localtime($date_next));
From: Wiggins d Anconia [mailto:[EMAIL PROTECTED]
Sent: Friday, 27 August 200
On Thu, 26 Aug 2004, Joe Echavarria wrote:
I am getting this error while trying to configure
MCPAN, the error is as follow :
Sorry for the confusion, it's not "MCPAN". Rather, "-M" is a command
line argument for perl that says to use the "m"odule you're about to
name. In this case, it's equivale
On 8/26/2004 11:39 PM, Chris Devers wrote:
On Thu, 26 Aug 2004, Joe Echavarria wrote:
Trying with "/usr/sfw/bin/ncftpget" to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
ftp.perl.org: unknown host.
ncftpget: cannot open ftp.perl.org: unknown host.
Can you ping this host? Can you FTP to it?
It s
One of my favorite things about perl is that long and tedious solutions can
often be replaced by incredibly elegant and concise ones.
I'm writing a sequence generator. I've got most of it handled, but this
part bugs me. I want it to take the variable $field containing, e.g.:
4.3:8.3
And turn
40 matches
Mail list logo