Hi all,
I have a problem interfacing Mysql with perl. I used
red Hat linux 7.0 as the OS and it comes with perl
built in (perl-5.6.0-9). I installed MySQL server and
client downloaded from its web site (www.mysql.org),
the versions are: MySQL-3.23.44-1 and
MySQL-client-3.23.43-1.
I also install
Hello All!
I have a HTML text box that I need users to write what ever they like in
it. Similar to the following
my $oofmsg= param('oofmsg');
$me = 'dan';
That gets passed on through a scrolling text box and from there it is
writen to a file like the following
open VAC2, "+< $
I think you should have something like the cgi-bin directory under the
web server where your cgi script should be. It depends on your web
server and how you configure it.
[EMAIL PROTECTED] wrote:
> Hello,
>
> Tried to be as descriptive as possible in my subject
> line. I have worked with per
Hello,
Tried to be as descriptive as possible in my subject
line. I have worked with perl off and on but now I am
trying to build things from the ground up and I can't
get my script to run from the browser. what are the
persmissions that allow script to run for the file and
the dir? Perl is in t
Hi all,
Need a little help on summarising 2 different tables into 1, based on a particular
field.
The 2 tables (they are actually content from a log file) look like the follow :
Table #1
1006788900 198 36
1006788600 29 35
1006788300 18 75
1006788000 19 65
1006787700 42 37
10067874
I can't honestly say I understand everything your code is trying to do, but
on my Linux box I just run this script..
#!/usr/bin/perl
chomp($user=shift(@ARGV));
die "No user specified at bash i.e. ./adduser.pl username\n" if $user eq "";
system("/usr/sbin/adduser $user");
Agustin Rivera
Webmaste
Hi all,
I mean to do what I want I had to add the following system command is
there and easier way to do the following code add on...?
#!/usr/bin/perl -w
use Unix::PasswdFile;
my $new_user = "test7";
my $new_fname = "Test";
my $new_lname = "Account";
my $new_pass = "password";
my $pw = new U
Hello all,
Could some one help me with the following code? Basically the code
works OK except for the fact that the user $new_user (s) home dir is not
created?
#!/usr/bin/perl -w
use Unix::PasswdFile;
my $new_user = "test7";
my $new_fname = "Test";
my $new_lname = "Account";
my $new_pass = "
Hello All,
Working on a "load" type function for sql files.
This is a quote from perldoc File::Basename
"You are guaranteed that if you concatenate path, name,
and suffix together in that order, the result will
denote the same file
--- Shawn <[EMAIL PROTECTED]> wrote:
> Geez, if your gonna flame a newcomer, at least answer the question while
> your at it.
This was a flame?
> > We just discussed this today. Please do NOT crosspost. This is better in
> the [EMAIL PROTECTED]
> > list. Further, having a useful subject line
Rus Foster <[EMAIL PROTECTED]> writes:
> my $foo="bar";
> $_ = $foo;
> $foo =~ s/bar/goo/g;
>
> There has to be a better way hasn't there?
Define "better". You've actually got two metaphores running side by
side.
Either use a named scalar variable:
my $foo="bar";
$foo =~ s/bar/goo/g;
Or
Geez, if your gonna flame a newcomer, at least answer the question while
your at it.
Don't post to multiple lists at once Lance
See below for answers to your question...
- Original Message -
From: "Curtis Poe" <[EMAIL PROTECTED]>
To: "Lance Prais" <[EMAIL PROTECTED]>; <[EMAIL PROTEC
We just discussed this today. Please do NOT crosspost. This is better in the
[EMAIL PROTECTED]
list. Further, having a useful subject line helps. If I had a penny for every
unhelpful subject
line I've seen today... hold on a minute... I'd have $1.27 :)
(tip 'o the keyboard to Terry Pratchet
use DB_File;
tie(@array, "DB_File", "/tmp/textfile", O_RDWR|O_CREAT, 0666, $DB_RECNO)
or die "Cannot open file 'text': $!\en" ;
$array[4] = "a new line";
untie @array;
In the above statment what is the following items refering too?
DB_File",
O_RDWR|O_CREAT
0666
DB_RECNO
--
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> On Dec 13, Jenda Krynicky said:
> > $num = ord($char) - ord('A') + 1
> >or if you do it often
> >
> > my $char_base = ord('A') - 1;
> > ...
> > $num = ord($char) - $char_base;
> No benefit to that, really. ord('A') is
Windows: A 32 bit extension and a graphical shell for a 16 bit patch to an 8
bit operating system originally coded for a 4 bit microprocessor, written by
a 2 bit company that can't stand 1 bit of competition, and cares 0 bits
about its customers!
Source: Going around the web, found by me on
http:
Michael Pratt wrote:
>
> Does anyone know how to go and get a file (with wild cards too) and dump
> them to a specifed directory on a local machine from the internet. weather
> it be ftp or http protocol? If so can I get an example?
#!/usr/bin/perl -w
use strict;
use Net::FTP;
my $local_dir =
> use Mail:Sendmail;
Try
use Mail::Sendmail; # Two ::, not one
-Akshay
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--- Etienne Marcotte <[EMAIL PROTECTED]> wrote:
> Little typo in your message, I've never seen 23 bits OS...:
Yes, but MS puts out a 2-bit OS :)
=
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/
__
On Thu, Dec 13, 2001 at 03:55:09PM -0500, Etienne Marcotte wrote:
> Little typo in your message, I've never seen 23 bits OS...:
Hah. Oh dear. :-)
It was intentional, honest. Windows is so sucky that it leaks nine
bits, and can only locate up to 23 bits of addressing space. It wasn't
a typo a
Win32 Perl Programming: The Standard Extensions, 2nd Edition, Dave Roth. This
book is a must for Win32 Perl.
Dean Theophilou
Genisar
-Original Message-
From: Wert, Nathaniel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 13, 2001 12:31 PM
To: Ryan Guy; '[EMAIL PROTECTED]'
Subject:
Little typo in your message, I've never seen 23 bits OS...:
Chris Ball wrote:
>
> On Thu, Dec 13, 2001 at 03:25:06PM -0500, Ryan Guy wrote:
> > If anyone knows where I can find some half way decent examples and
> > explanations I would be thrilled thanks.
>
> The 'test.pl', 'docs/{intro,referen
On Thu, Dec 13, 2001 at 03:25:06PM -0500, Ryan Guy wrote:
> If anyone knows where I can find some half way decent examples and
> explanations I would be thrilled thanks.
The 'test.pl', 'docs/{intro,reference}.html' and POD files in the
distribution. Especially the POD, which has documentation an
Looking for the same thing.
-Original Message-
From: Ryan Guy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 13, 2001 3:25 PM
To: '[EMAIL PROTECTED]'
Subject: Win32::Console.
If anyone knows where I can find some half way decent examples and
explanations I would be thrilled thanks.
Thanks ALL! I got it.
-_-Aaron
-Original Message-
From: Etienne Marcotte [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 13, 2001 12:25 PM
To: Aaron Shurts; [EMAIL PROTECTED]
Subject: Re: Getting rid of junk.
and while re-reading you post:
why are you using while( ($login) = $st
and while re-reading you post:
why are you using while( ($login) = $sth->fetchrow_array ())
and not while (my @row = $sth->fetchrow_array ()) ??? array is @, no?
foreach %login is a hash abnd you have login as a variable..
I think what you are looking is something like:
my $sth = $dbh->prepare
ok... I'm writing a perl program that will use scp to copy a file from
one machine to another securely.
The problem is that scp asks for the users password... how can I have
perl answer scp's request for a password...
by hand it looks like so;
$$scp -C test [EMAIL PROTECTED]:test
[EMA
If anyone knows where I can find some half way decent examples and
explanations I would be thrilled thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Dec 13, Jenda Krynicky said:
> $num = ord($char) - ord('A') + 1
>
>or if you do it often
>
> my $char_base = ord('A') - 1;
> ...
> $num = ord($char) - $char_base;
No benefit to that, really. ord('A') is calculated at compile-time, not
run-time.
--
Jeff "japhy" Piny
Hi Aaron,
$login =~ s!^\d{3}!!;
See also:
perldoc perlre
Cheers,
Kevin
On Thu, Dec 13, 2001 at 12:08:07PM -0800, Aaron Shurts ([EMAIL PROTECTED]) said
something similar to:
> I am not sure what to use in this case.
> I am grabbing a bunch of login information from our database. The login
> h
check out substr!
http://www.perldoc.com/perl5.6.1/pod/func/substr.html
$var= substr($var,3);
Etienne
Aaron Shurts wrote:
>
> I am not sure what to use in this case.
> I am grabbing a bunch of login information from our database. The login
> has 3 leading numbers. i.e. The value returned i
From: "Collins, Joe (EDSI\\BDR)" <[EMAIL PROTECTED]>
> How can I convert the scalar 'A' (or 'a') to 1, 'B' to 2 and so on?
> Related: how do I get the true internal value for A, i.e. ascii
> value?
$num = ord($char) - ord('A') + 1
or if you do it often
my $ch
I am not sure what to use in this case.
I am grabbing a bunch of login information from our database. The login
has 3 leading numbers. i.e. The value returned is:
123login
I need to strip the 123 off and discard it. That value is unimportant
to me. Here is my pseudo-code:
while( ($login) = $
--- "Collins, Joe (EDSI\\BDR)" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How can I convert the scalar 'A' (or 'a') to 1, 'B' to 2 and so on?
my %alpha_to_num;
@alpha_to_num{ A .. Z } = ( 1 .. 26 );
print $alpha_to_num{ A };
> Related: how do I get the true internal value for A, i.e. ascii value?
Hi,
How can I convert the scalar 'A' (or 'a') to 1, 'B' to 2 and so on?
Related: how do I get the true internal value for A, i.e. ascii value?
Thanks!
Joe
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Yes
No
note the values has changed, you can put whatever you want, you can also
add more radio choices.
this question should be directed to beginners-cgi:-)
Etienne
Rohesia Hamilton wrote:
>
> I'm completely new to Perl and am writing my first
> script.
>
> I have regular input fields on a f
I'm completely new to Perl and am writing my first
script.
I have regular input fields on a form like this:
which I'm managing to access in a form-to-email script
like this:
$FirstName = param('FirstName');
That's working. However, wherever I have radio buttons
on the form like this:
Yes
No
t
From: "Lanceo" <[EMAIL PROTECTED]>
> What C compiler does a Makefile.PL file expect?
The one with which your perl was compiled.
I think you can force Make::Maker to create makefiles for gcc, but I
don't remember what exactly has to be changed in Config.pm
I'd think this is
On Dec 13, Dermot Paikkos said:
>I want to use a scalar value as part of the name of an array. I have
>tried:
>push(@failed_$value,$data);
You do not want to have arrays named @failed_1, @failed_2, @failed_3,
etc. That is bad form. Instead, you want to have an array of array
(references):
From: "Dermot Paikkos" <[EMAIL PROTECTED]>
> I want to use a scalar value as part of the name of an array. I have
> tried: push(@failed_$value,$data); but I get an error back "Scalar
> found where operator expected at ../makecd.pl line 168, at end of line
> (Missing operator befo
What C compiler does a Makefile.PL file expect? I am having problems
installing the MD5 module into a Perl installation on NT4, and I get a
'can't compile test program' error. When I look at the Makefile.PL
sourcecode, it seems to want to issue the commands to the compiler in a
different way tha
Hi Gurus,
I want to use a scalar value as part of the name of an array. I have
tried:
push(@failed_$value,$data);
but I get an error back "Scalar found where operator expected at
../makecd.pl line 168, at end of line (Missing operator before ?)"
Is there someway to do this?
Thanx.
Dp.
~~
Dermo
That is in the FAQ, which everyone should have read, and shouldn't need to be said
on the list. Actually, I seem to have left it out of the beginners-cgi FAQ and
will add it in. For those of you only on the beginners-cgi list, until it is in
the FAQ, have useful subjects :)
Cheers,
Kevin
On Thu,
Ryan Guy wrote:
>
> I guess I was a little harsh. I just had a very bad night and I guess I
> took it out a little on you. Sorry. You werent any of the things that I
> said. I understand your viewpoint. Just wanted to apologize. No hard
> feelings?
Of course not :-)
Thanks to Etienne.
He
May I add one other thing?
Sorry if this is posted on both lists, but it's useful for everyone.
PLEASE post mails with a *descriptive* subject!
Subjects like
"Problem"
"Help please"
"I need some advise"
"Question"
"Beginner question"
and such should be *avoided*.
We almost all receive hundred
Hello,
I would like to ask people to be more mindful about cross-posting to both the
'beginners' and the 'beginners-cgi' lists. In other words, don't. The
'beginners' list is meant for Perl questions, not Perl/CGI questions. We added
the 'beginners-cgi' list in order to handle the Perl/CGI relate
I need to read lines 26 and 27 to check to see if there are two things
present
1. That from col 11-18 Running is there and 58-82 is NULL
I am using the seek function to do this. Is that correct? From my
understand the only positions you can set are.
0. Beginning
1. Current
2
stat is what you want, 'man perlfunc'.
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks)
= stat($filename);
/Jon
Michael Pratt wrote:
>
> Hello,
>
> How do I get a file date time stamp?
>
> Thanks
> Mike
>
>
Hello,
How do I get a file date time stamp?
Thanks
Mike
_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED
NAME
beginners-faq - FAQ for the beginners mailing list
1 - Administriva
1.1 - I'm not subscribed - how do I subscribe?
Send mail to <[EMAIL PROTECTED]>
You can also specify your subscription email address by sending email to
(assuming [EMAIL PROTECTED] is your email address)
Is there some trick to this?
use Win32::Console;
$con = Win32::Console->new(STD_INPUT_HANDLE);
@event = $con->PeekInput();
$tmp = chr($event[5]);
print "\n The character typed was: $tmp \n";
If I use Input() instead of PeekInput() it works fine and the docs say that it is
suposed to work the sa
I think you should have to use
use Mail::Sendmail
Bye.
On Dec 13, Lance Prais said:
>use Mail:Sendmail;
use Mail::Sendmail;
Notice the doubled colon.
>%mail = ( To =>'[EMAIL PROTECTED]',
>From=> 'Nobody',
>Subject => 'Error',
>Message => "my $data = for (1..21)"
> );
I don't think M
Hi Lance:
use Mail:Sendmail;
should be
use Mail::Sendmail;
Have a good day,
Francis
Lance Prais wrote:
> I am using the following piece of code to send email I can not figure out
> why it errors out because it worked the other day and now it is not. I have
> not changed anything on the syst
I am using the following piece of code to send email I can not figure out
why it errors out because it worked the other day and now it is not. I have
not changed anything on the system and installed the sendmail.pl in the lib
folder:
use Mail:Sendmail;
%mail = ( To =>'[EMAIL PROTECTED]
I'm trying to code a routine for uploading up to four images via a
CGI-form, using CGI.pm.
Filenames including local paths are stored in @files_to_upload.
At this point in the script I have the base names of each file in
@files_to_uploaded associated with the full filename in %basename, and the
Thursday, December 13, 2001, 2:48:16 PM, Warren, Barry wrote:
> For example, I want to issue a command line prompt for the user to key in a
> directory name.
> I would like the current directory to be displayed on the command line and
> be editable.
> Key in directory name: /home/currentdir
how
Hi,
Is someone try this once ?
Is it really efficient ?
In an other subject I have some pbs to install it and have the error :
Warning: prerequisite WWW::Search failed to load: Can't locate WWW/Search.pm in @INC
And it fails on exec for the same error
whereas the module WWW/Search.pm seems
Hi All,
I've google for this but for the life of me I can't find it. Basic
premise is that I have a variable, want to run a regexp over it and then
put the results back into itself. So far I have
my $foo="bar";
$_ = $foo;
$foo =~ s/bar/goo/g;
There has to be a better way hasn't there?
Rus
-
> -Original Message-
> From: Purshottam Chandak [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 13, 2001 4:10 AM
> To: [EMAIL PROTECTED]
> Subject: PerlDoc
>
>
> I typed the command perldoc -u -f and it works.
>
> However, when I used the command: perldoc -u -f atan2
> It doesn't
How can I pre-populate the standard input.
For example, I want to issue a command line prompt for the user to key in a
directory name.
I would like the current directory to be displayed on the command line and
be editable.
Key in directory name: /home/currentdir
Thanks,
Barry
--
To unsubscri
On Thursday 13 December 2001 16:36, Ryan Guy wrote:
> just a simple question. I am new to the whole RegExp thing. It gets kind
> of confusing. If someone could point me in the direction of a good
> tutorial with plenty of examples or if someone could post a few regexp with
> small code snippets
just a simple question. I am new to the whole RegExp thing. It gets kind
of confusing. If someone could point me in the direction of a good tutorial
with plenty of examples or if someone could post a few regexp with small
code snippets and explain I would appreciate very much. Thanks in advanc
Actually, I'm not with you on this one.. there is the original message:
=
From: "Juan Manuel Espinoza" <[EMAIL PROTECTED]>Wed 12:04 PM
Subject: Password form
To: [EMAIL PROTECTED]
Hi everybody!
How can i do a file that process a password form.
and if the pass is correct open a URL.
Andrea,
I guess I was a little harsh. I just had a very bad night and I guess I
took it out a little on you. Sorry. You werent any of the things that I
said. I understand your viewpoint. Just wanted to apologize. No hard
feelings?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addition
Ryan Guy wrote:
>
> Actually, Andrea, if that is your real name, his question was more than
> detailed enough. Although I may not currently possess the information that
> he is looking for I can still spot a thoroughly precise question.
> Apparently you can not. Maybe you should work on that be
Actually, Andrea, if that is your real name, his question was more than
detailed enough. Although I may not currently possess the information that
he is looking for I can still spot a thoroughly precise question.
Apparently you can not. Maybe you should work on that before you get your
masters i
Klaas schrieb:
> I'm a real beginner.
> I made a little program to copy files to an other folder (see below)
>
> # Remote resetten van ColdFusion server
>
> $interval=5;
> while (l) {
> sleep ($interval - time() % $interval );
> if (-r 'c:\reset\spool\cfreset.bat') {
>
Pete Emerson wrote:
>
> I'd appreciate it if someone could help me wrap my brain around this one.
> I've got a string like this:
> $string='"one two" three "four five six"';
>
> I'd like to wind up with an array like this:
> one two
> three
> four five six
>
> Essentially, I would like to split
Mark McLogan wrote:
>
> Hi every body
> I want delete some lines of a file
> I desire to erase the lines that contain the word " home " since I can
> make to eliminate these lines in the text if I have this word content in a
> variable $var
Who has the luck to use a real OS, not a baby tool :-
Juan Manuel Espinoza wrote:
>
> Hi everybody!
>
> How can i do a file that process a password form.
> and if the pass is correct open a URL.
>
Sorry, but your description is not detailed enough.
What kind of password form ?
- shell
- password window by tk
- remote access like telnet
- browser
--On Mittwoch, 12. Dezember 2001 14:24 +0100 Andrea Holstein
<[EMAIL PROTECTED]> wrote:
> I think the problem isn't the regexp, it's in the line:
>
> my $content = qq|
>
> You used the qq| ... | notation which is equivalent to " ... ".
> So there's interpolation and for especially \2 could be in
Does anyone know how to go and get a file (with wild cards too) and dump
them to a specifed directory on a local machine from the internet. weather
it be ftp or http protocol? If so can I get an example?
Thanks for all your help!
Mike
_
From: Pete Emerson <[EMAIL PROTECTED]>
> I'd appreciate it if someone could help me wrap my brain around this
> one. I've got a string like this: $string='"one two" three "four five
> six"';
>
> I'd like to wind up with an array like this:
> one two
> three
> four five six
>
>
From: "Brett W. McCoy" <[EMAIL PROTECTED]>
> On Wed, 12 Dec 2001, Johnson, Shaunn wrote:
>
> > --i know. i *know* i must be doing something goofy.
>
>
> > #$addr=`cat /tmp/email_users.txt`;
> > $addr='[EMAIL PROTECTED]';
> ^
> > $addr_frm='[EMAIL PROTECTED]';
>
Hi,
some alternative approaches would be:
my $res = `$cmd`; # note that it's not "'" but "`"
# $res only stdout, this will puke out stderr
or
my $res = `$cmd 2>&1`; # redirect stderr to stdout
# $res is now both stderr and stdout
or
my $res = `$cmd 2>/dev/null`; # throw away stderr
# $res
Hi,
You can always write STDERR and STDOUT to a temp file then read the contents
of this file back in to your script.
eg
system (some_command 1>.stdout 2>.stder);
STDOUT is written to .stdout
STDERR is written to .stderr
Theres is probably a better way than this but I find this the easiest.
Hi,
There is a section in "Perl for system administration (O'reilly)" that
covers account management.
The examples use the useradd / userdel commands instead of editing the
password files directly - this they say handles all the file locking for you
:) . Passwords are changed using some nice use
Lance Prais wrote:
>
> #open a file with the filehandle
> open WORKFLOW, "..\\..\\workflow.txt" or die "Cannot open Workflow $!\n";
> my $data = for (1..21);
> while # loop through the workflow.txt
>
> chomp; #a)
> my $line=$_;
> print STDERR "\nline: $line";
> }
>
> The above code
You can if the database is accessible from the webserver.
Read about apache (www.apache.org) and perl (www.perl.org), especially
the modules CGI.pm and DBI.pm.
/Jon
Allison Davis wrote:
>
> Can anyone tell me if you can have all the members of our origanization
> access our database on the web
Hi, I wanted to do this in a better Perlish Way:
my $Range1 = $1 . ($2 + 10) if $IPREAL[0] =~ /^(.*\.)(.+)$/;
my $Range2 = $1 . ($2 + 10) if $IPREAL[1] =~ /^(.*\.)(.+)$/;
my $newline2= "subnet $IP[0] netmask 255.255.255.0{range dynamic-bootp
$IPREAL[0] $Range1;}";
my $newline3= "subnet $IP[1]
On Thu, 13 Dec 2001 09:47:22 +1030, [EMAIL PROTECTED]
(Daniel Falkenberg) wrote:
>I have just finally finished a WWW based Perl program that can
>add/delete and change users password from a WWW based script. I have
>tried to make this script as secure as I can. The script can modify the
>/etc/pa
I want to store data in the file directory for Windows, thus utilizing the
system's directory entry locking mechanism, instead of having to build a
file locking mechanism myself. This way I can have muliple users accessing
the same data, without colliding with each other.
How can I do this using
I typed the command perldoc -u -f and it works.
However, when I used the command: perldoc -u -f atan2
It doesn't work. why?? I am using Windows ME platform.
Pc
_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
84 matches
Mail list logo