Hytham,
from a command prompt
type
1) PPM
2) INSTALL DBI
it really is that simpe
:-)
regards
Joel
-Original Message-
From: Hytham Shehab [mailto:[EMAIL PROTECTED]]
Sent: 13 March 2002 12:59
To: [EMAIL PROTECTED]
Subject: dbi module for ActivePerl
Hello!,
i use perl from
i'm a beginner were do we start, lol, please let me know ok.. thank you very much..
charles
Hi all,
I have a question about using CGI.pm.
How it is better? To print directly the html code with
print html head title .../title /head; etc. or
to print using the CGI.pm
print $q- start_html(...); etc.
Does it work faster in a way or another, or are there any advantages?
I saw that
Hi all,
I tried the following line to open another location, but it doesn't work.
print $screen - redirect(-uri='http://localhost/index.html');
It doesn't redirect to another location. It just prints the following:
Status: 302 Moved Location: http://localhost/index.html
Do you have any idea
thanks joel,
but i try to see the available drivers with @x=DBI-available_drivers;
it gives me Example and Proxy, with no sign of MySQL - mysql is installed
and working properly with other version of perl, ie perl from perl.com - so
what is the problem.
thanks in advance.
--
Hytham Shehab
print CGI::header();
print hello\n;
print foo\n;
print bar\n;
foreach my $line (FILE) {
my $result = do_something($line);
}
use LWP::Simple;
my $credit_card_server = secure.mybank.com;
my $username = my_secret_username;
my $password = my_password;
for $name
What are you trying to match? If it's just the dir name then:
/\/(tmp_\w)/ will do it and set $1 to equal your directory name.
~mark.
http://www.workzoo.com/
Zysman, Roiy wrote:
Hi All,
As we all know Regular Expressions are very greedy and tries to big as big
as possible.
How do i limit
You have two dollar signs before the 'name' variable in the loop. That probably works
provided the value of the variable is not a number, but it may be causing the
strangeness you're experiencing. Always 'use strict' in your scripts. You should be
storing your params in a hash and doing
Sunday, March 17, 2002, 12:18:01 AM, Dave Chappell wrote:
Thanks. I got lots to learn about perl, thinking for the 2 hours I was
trying to solve my issue with chomp and split. I have began disecting your
reponse to learn from it. One question, the last print statement:
print $_ . \n;
what
Hi everyone,
I'm writing a CGI program that requires that I discover the dimensions of an
image that a person uploads. Can perl or javascript do that?
Thanks
Tricia
Sunday, March 17, 2002, 10:41:01 AM, Mark Maunder wrote:
You have two dollar signs before the 'name' variable in
the loop. That probably works provided the value of the
variable is not a number, but it may be causing the
strangeness you're experiencing. Always 'use strict' in
your scripts.
Sunday, March 17, 2002, 12:43:07 AM, [EMAIL PROTECTED] wrote:
I'm writing a CGI program that requires that I discover the dimensions of an
image that a person uploads. Can perl or javascript do that?
The Image::Size module on CPAN does exactly that:
Thanks. I got lots to learn about perl, thinking
for the 2 hours I was trying to solve my issue
with chomp and split. I have began disecting your
reponse to learn from it. One question, the last
print statement:
print $_ . \n;
since ($Jonathan eq Fool) {
Opps... I've abondoned my
Also, check out PerlMagick - a perl interface into the ImageMagick library of
image manipulation. The homepage is at:
http://www.imagemagick.org/www/perl.html
You can resize images to create thumbnails, and insert text into images (like your
site's URL for example) and do a bunch of other cool
I'm sorry if i wasn't clear
after tmp_ can come any character for example tmp_6676frf877 or
tmp_hbhbbd3y78783xcbh
how can i limit my regex to catch any character but not /
Thx Roiy
-Original Message-
From: Mark Maunder [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 17, 2002 12:13 PM
To:
Sunday, March 17, 2002, 1:10:16 PM, Zysman, Roiy wrote:
I'm sorry if i wasn't clear
after tmp_ can come any character for example tmp_6676frf877 or
tmp_hbhbbd3y78783xcbh
how can i limit my regex to catch any character but not /
Thx Roiy
how about
m|/(tmp_[^/]+)|;
which says, match a /,
How do you keep line numbering straight in a perl script.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Fri, 15 Mar 2002 16:03:03 -0500, [EMAIL PROTECTED] (Peter Farrar)
wrote:
I've been growing interested in the Tk module too. I found this today.
It's really really introductory.
http://www.perl.com/pub/a/1999/10/perltk/
I am planning to write a litte graphical interface for an application
From: gkotsovilis [EMAIL PROTECTED]
How do you keep line numbering straight in a perl script.
Beg your pardon?
What line numbering? How is it not straight? What do you do, what
do you expect and what do you get?
Jenda
=== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
How do you keep line numbering straight
in a perl script.
No code example? I can only assume you want:
while () {
printf %.5d: %s, $., $_;
}
or maybe:
while () {
printf %5s: %s, $., $_;
}
or even:
perl -n -e 'printf%.5d: %s,$.,$_'
Clear description of your requirements is
Perhaps you learnt to program with something like Apple Basic like I did
nostalgia modewhen I was 10 years old on the Apple IIe/nostalgia
mode which requires line numbers. Perl doesn't need them.
gkotsovilis wrote:
How do you keep line numbering straight in a perl script.
--
To unsubscribe,
Whoa. That brings back memories. The scary thing is that two years ago I
was working at a place that still had their entire inventory/purchasing/HR
system was programmed in BASIC. They didn't seem to get it when I pointed
out that anyone could press ^C, GOTO the line were the passwords were
I am trying to create a script that read a
file and count consonnant then output the
results to another file. I would ask here
if anybody can help me to write the script.
Does this sound like homework or what?
1. the c at the end of words
2. the cc at the end of words
3. the cing at the
I guess you're not familiar with dancc scripting? :)
At the very least, if you must ask for help because you're stuck on
something, ask for help on the thing you're stuck on, don't just ask someone
to write it for you. People charge for that sort of thing.
-Original Message-
From:
I'm fairly certain I'm attacking this incorrectly, so any advice is
greatly appreciated...
Task:
I want to sort through my Solaris syslog (/var/adm/messages) looking for
any system
reboots which always start with the string SunOS and, if found, return
that line and
the next 20 lines, at least
I'm no expert myself, so I can't comment on the perl, but if as you say the
SunOS is at the start of the line.
reboots which always start with the string SunOS and, if found, return
You may want to put a ^ in your regex to fix this. So,
if ($_ =~ /SunOS/)
becomes:
if ($_ =~
Sunday, March 17, 2002, 9:44:49 PM, swansong wrote:
I'm fairly certain I'm attacking this incorrectly, so any advice is
greatly appreciated...
Task:
I want to sort through my Solaris syslog (/var/adm/messages) looking for
any system
reboots which always start with the string SunOS and,
My apologies for the 3 posts, netscape kept crashing so my last one from IE
is the newest code...
my dilemna isn't that it starts at the beginning of the line, the regex, as
it doesn,'t.
rather, how do I say
open file, read file, for every occurrence of regex, print that line + the
next 20
Here is a simplistci approach which does what you want:
while ( FILE ) {
next if ( ! /SunOS/ );
printf The desired line's number is $.\n;
print $_;
for ($i = 0; $i 20; $i++) {
$_ = FILE;
print $_;
}
}
Tested gave the corrct line number, SunOs plus 20 more
swansong [[EMAIL PROTECTED]] quoth:
*I'm fairly certain I'm attacking this incorrectly, so any advice is
*greatly appreciated...
Well...there are easier ways to do it. Let syslog do the work for you
and add
'kern.debug /var/adm/kern_debug.log'
to /etc/syslog.conf [ the space must be a tab
Swansong wrote:
I'm fairly certain I'm attacking this incorrectly, so any advice is
greatly appreciated...
Task:
I want to sort through my Solaris syslog (/var/adm/messages) looking for
any system reboots which always start with the string SunOS and, if
found, return that line and the
works for me, so nothing wrong with your perl code.
maybe you could show us the url you are using to reach this code.
On Saturday, March 16, 2002, at 10:34 PM, Mariusz wrote:
html tags are not the problem. I included another print statement before
the loop and that outputs text 1 here to
I do not understand the results of the following experiment, and would
appreciate input.
Using telnet on a Win PC, I executed this code:
perl -e print Hello world.\n\r' /dev/tty1
On my Linux system monitor (/dev/tty1), I see Hello world. printed along
with the newline and carriage
Hello John,
Monday, March 18, 2002, 5:15:18 AM, John wrote:
I do not understand the results of the following experiment, and would
appreciate input.
Using telnet on a Win PC, I executed this code:
perl -e print Hello world.\n\r' /dev/tty1
On my Linux system monitor
most providers such as Sprint PCS has a web interface/cgi script that
allows a visitor to send a text message to a sprint phone.
On Mon, 11 Mar 2002, Joyce Harris wrote:
I am looking for info on how to send an alert message to a cell phone
from a perl script. Any ideas?
--
To
Hi
I am want to add digits in In_digits together.
Print total to screen.
Could someone help?
Thanx
Bruce
In_digits:
1,200
2,400
#!/usr/bin/perl -w
open(INPUT, In_digits) || die;
open(OUTPUT, Out_digits) || die;
while (INPUT) {
if (/(\d{1})(\,)(\d{3})/) {
print
Daniel,
Thanks for the suggestion, but I'd already tried that variation-on-a-theme
with no luck.
I'm really looking for the right code to have telnet execute an Enter key
function at the finish of my perl script.
John--
-Original Message-
From: Daniel Gardner [mailto:[EMAIL
Hi
I am want to add digits in In_digits together.
Print total to screen.
Could someone help?
Thanx
Bruce
In_digits:
1,200
2,400
#!/usr/bin/perl -w
open(INPUT, In_digits) || die;
open(OUTPUT, Out_digits) || die;
while (INPUT) {
if (/(\d{1})(\,)(\d{3})/) {
print
I think you have most of this solved. You even already have the numbers in
a variable, ready to use. In the following line,
if (/(\d{1})(\,)(\d{3})/) {
the part of the string that is represented by each set of parentheses within
the match is assigned a numeric variable ($1, $2, etc.).
So
39 matches
Mail list logo