Hi All,
I'm having trouble loading a datafile into MySQL database via perl. I
have a couple of scripts working but I get stuck when I try to load a
file Here is what I have so far... How far off am I?? :-)
$dbh->do("load data local infile $dbh->quote(/home/misc/cell_sql.csv)
Hi: I have a script that connects to my PostgreSQL7.0.3 OK.
Now, I also have text files that contain:
column_name: data
I want to open the database, open the file, read each line that has a
column_name followed by a colon and space, then the data, and move it
to the table in PostgreSQL. Has a
hi
how can i read data which be sent from a form in
html file by post or get ? for example in a form
i want get fist and last name of user and show those
by
a perl file ..
thanks
bye
__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free
hi ..
if anyone have all messages from first
which send by "beginners-digest"
please in a zip file sent to me ...
thanks
bye
__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
--
To unsubscribe, e-mai
I have found this testing harness to be very helpful. Perhaps this will
help you understand options better than just a snippet as this incorprates
many options...
HTH!
Bill A.
-Original Message-
From: M z [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 10:26 AM
To: [EMAIL PROT
Hello All,
Just wondering what would be my best way of 'getting' HTML code with
Perl from a HTTPS URL. Is there a CPAN module out there that will
download a HTTPS site and extract all the HTML from it?
Kind regards,
Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-
Duh, forgot to change the extention from .cgi to .txt
Ok, I'm getting closer thanks to the help of all the experts out here!! I'm
totally thankful for all of your help.
Now, I've rewritten most of what I had before, using suggestions and
examples from our resident Perl Pros.
While I'm closer t
Ok, I'm getting closer thanks to the help of all the experts out here!! I'm
totally thankful for all of your help.
Now, I've rewritten most of what I had before, using suggestions and
examples from our resident Perl Pros.
While I'm closer to my desired outcome, I'm still not there; here is my
Hi,
On Solaris the perlcc options has the -gen -sav options to save the
generated C code, etc. However, on HP-UX, these options do not exist. Also,
while compiling my script on HP, compilation fails with the error -
ld: Unsatisfied symbols:
boot_File__Glob (code)
Any ideas ? Has the perlcc nam
Thanks Jenda,
I'll look into this.
F.O.R.
Jenda Krynicky <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED].;
> From: "Frank 'Olorin' Rizzi" <[EMAIL PROTECTED]>
>
> > So, I love DBM files,
> > because I think they'll work just great for the application I have to
> > develop.
> >
> > S
Forget it... found it... it was $NEW{$file}[2] that was wrong...
%NEW is actually a hash of a hash of an array. forgot the second key.
> -Original Message-
> From: Nikola Janceski
> Sent: Tuesday, March 05, 2002 5:18 PM
> To: '[EMAIL PROTECTED]'
> Subject: Half asleep an
I am getting stuck... and I don't know what to do about this... And I am
half asleep. It has to be something stupid.
early in my code I populate %COOR with
push @{ $COOR{$file} }, $chgid;
Then later I try to use that info with:
foreach my $file (keys %NEW){
while (my ($cfile, $ids) = e
--- "Balint, Jess" <[EMAIL PROTECTED]> wrote:
> Hello all. I am working on a script ON UNIX!
Don't scream... many Perl programmers use Unix, its
quite common actually.
> that needs the current username. Is there any
> environment variable that has this?
You are looking for $< (Real) and $> (E
Louden, Chris [[EMAIL PROTECTED]] quoth:
*>Hello, just joined the group looking for some help with Perl. I used to have
*>an NT box running Perl from Active State, it died in a most gruesome way.
*>Now I have a Novell 5.1 Server. Trying to reconfigure some of the scripts to
*>run in the Novell env
On Mar 5, Balint, Jess said:
>Hello all. I am working on a script ON UNIX! that needs the current
>username. Is there any environment variable that has this? Or am I doomed to
>parsing `who am i`? TIA.
Well, you have $ENV{USER} and getpwuid($<).
--
Jeff "japhy" Pinyan [EMAIL PROTECTED]
Hello all. I am working on a script ON UNIX! that needs the current
username. Is there any environment variable that has this? Or am I doomed to
parsing `who am i`? TIA.
-Jess
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Mar 5, zentara said:
>It's a bash shell script that makes regexes based
>on a question-answer sequence.
There is work being done on a Perl module for the functional creation of
regexes.
And there's also Regexp::Common.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com
Here is what I have so far. It works on an NT PC running Perl from Active
State, but I need to run it on a Novell box. Paths to directories are
different. Im not sure how to type in the paths, the standard
"servername:volume/path/to/dir" does not seem to work. This checks for files
modified in the
Hi,
I use both. My decision which to use in what projects is solely based on
"performance vs. feature" comparisons. Where I need transactions,
subselects (no complaint about this, I find sometimes problems where I need
them) and all this, and on the other hand, my application is _not_ purely
I think it is unlikely that you will find any samples on the web like this
(but ya never know).
Frankly though it sounds like a simple problem, maybe less than 10 lines of
code depending on the complexity. You might want to look at the docs for
File::Find and File::Copy to get some ideas.
http:
Hi,
I think some of you may be interested in this.
I don't think this will make Japhy or John Krahn
obsolete. :-)
It's a bash shell script that makes regexes based
on a question-answer sequence.
http://txt2regex.sourceforge.net/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional co
Greetings;
It sounds like there are two main dbms in common use;
PostgreSQL and mysql.
What are the preferences of the group members? Are there any
major or important differences between them? Any religious
issues? ;-)
Thanks for any info,
Dennis
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Anyone know any good site for example scripts, specifically for moving or
coping files that meet certain criteria?
Chris Louden
Engineering Automation Support
Bechtel Nevada / D.O.E.
702-295-2336 -phone
702-794-1968 -pager
click on the link below to send a text message to my pager:
http://pagin
Thank you. I actually got it working... Another subscriber form this
list show me that I didn't have the DBD::mysql installed correctly.
Thank you.
Brian Volk
[EMAIL PROTECTED] wrote:
>my $dbh = DBI->connect ( "DBD:mysql :database=perl
>:host=localhost",$username,$password)
>
I know there's an easier way, but here's one way...
unless(-e $destDir){ #check for directory creation
my @dirs = split /\\/,$destDir; # this was made on a Win32 system
my $dirstring;
foreach(@dirs){ #build directory tree if it does not exist
$dirstrin
On Mar 5, zentara said:
>Is there a way to deal with this without resorting to a
>system call?
>
>In bash it's easy,
>mkdir -p 1/2/3
Use the File::Path module (it's standard):
use File::Path 'mkpath';
mkpath($some_dir);
mkpath([ $dir1, $dir2, $dir3 ]);
See the documentation for more inf
Dru Levin wrote:
>
> I am a newbie trying to write Perl scripts in Linux environment:
>
> question is, why is Perl evaluating my " (quotes) as ? (question marks) ? ,
> i.e. like in a simple string " blah blah blah"
It could be that the program you are using to create the file is not
using ASCII
Hi,
I was writing a script in which I needed to make
a directory "at depth", without having the parent directories
created yet. For example:
#!/usr/bin/perl
use warnings;
mkdir("1/2/3", 0777) || die "cannot mkdir 1/2/3: $!";
Is there a way to deal with this without resorting to a
system call
On Mar 4, Shaun Fryer said:
>I'm trying to convert an old script that used cgi-lib.pl over to using
>CGI.pm. In order to save time I'd like to simply do something like
>what follows (though that doesn't actually work it seems).
>
>%in = param;
param() only returns field names. But why not just
I'm trying to convert an old script that used cgi-lib.pl over to using
CGI.pm. In order to save time I'd like to simply do something like
what follows (though that doesn't actually work it seems).
%in = param;
Any ideas?
===
Shaun Fryer
===
London Webmasters
h
> 1. loop over an array of hostnames and resolve them each with a call
> gethostbyname
gethostbyaddr is what you want. sorry.
> 2. use Net::DNS and do a named xfer for the domain all the servers are in
> and afterwards grep through the results for the hosts you actually need.
>
>Perform
Tor Hildrum wrote:
>
> #!/usr/bin/perl -w
> use strict;
> use warnings;
>
> print "What file do you want to open?\n";
> chomp(my $openfile = );
> print "What file do you want to write to?\n";
> chomp(my $outfile = );
> print "What do you want to replace in the first file?\n";
> chomp(my $pattern
Hi,
you have several options:
1. loop over an array of hostnames and resolve them each with a call
gethostbyname
2. use Net::DNS and do a named xfer for the domain all the servers are in
and afterwards grep through the results for the hosts you actually need.
Perform a zone transfer a
Without more code, I can't totally understand what might be wrong.
When you increment $num are you sure that $line also get's updated?
I'm wondering if you are expecting $array[$num] to get reevaluated with
the new value of $num every time you dereference $line. If so, that's a bad
assumption.
$l
thanks to Bradford Rithcie and Nikola Janceski for pointing out the problem.
yes, I was not updating the $line each time the increment occurred.
I foolishly assumed that an increment of a value was globally changed,
so I didn't need to do it.
Doh!
-Original Message-
From: Bradford Ritchi
Hi guys
I was wondering if you could help me.
I am bulk copying data from a Database using bcp into a data file.
Can I transform my data file into a DBM file in perl ?
If so, how do I go about it ?
I would be most grateful if you could let me know.
Cheers
Tony
Basically, if you have the windows installer (InstMsiA.exe), all you need
is to download ActivePerl, and double-click
on the downloaded file (through My Computer icon).
For details, go to this site:
http://www.activestate.com/Products/Download/Get.plex?id=ActivePerl
and click on "next", then :
Visit: http://www.activestate.com/Products/Download/Get.plex?id=ActivePerl
Currently Activestate Build Version 631 is the latest of Perl 5.6 on
Activestate. You will it get it from the aforementioned link.
This not only installs Perl on Windows OS, but also configures other ISAPI
filters and reg
Hi,
I was wondering how to install Perl. I am on a Win32 operating system.
Thanks.
Ally
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Here is a good link to get started...
http://www.spu.edu/help/tech/basic-perl/
>From: Jason Larson <[EMAIL PROTECTED]>
>To: 'Raja Gopal' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>Subject: RE: Request from Beginner
>Date: Tue, 5 Mar 2002 07:45:14 -0600
>
> > -Original Message-
> > From: Raj
Hello
I was looking into documentation on the getopts
module, but was having some difficulty understanding
how to implement it.
The scope of my problem is quite simple, actually.
can someone help me create a snippet where if no
argument is specified at the command line, than the
output is writt
Using PERL, how do I dump all the DNS entries of a nameserver?
REASON:
Given a set of host IPS, I want to come up with a table of IP vrs hostname.
I am currently in a DNS environment, so /etc/hosts is of no use. Instead
of querying DNS for each IP (using nslookup), I want to query the DNS
server
From: [EMAIL PROTECTED]
> I am trying to do this with Perl/Tk, but it fails to work, only
> displaying the initial line of the text file:
>
> This is the definition of the variable
>
> $line=$array[$num];
>
> $num is incremented elsewhere with the click of the button.
>
> Th
in the place where you increment $num do you re-assign $line?
$num++; ## this changes only $num
$line=$array[$num]; # this changes $line to the new index that $num is now.
if you don't do the second line then $line will still be
$array[whatever $num was before]
you need to reassign $line to th
It would help if you gave a better example of what you've done. Can you
post your code?
-Original Message-
From: dru levin
To: [EMAIL PROTECTED]
Sent: 3/4/02 6:29 PM
Subject: painful but bonehead question
I am a newbie trying to write Perl scripts in Linux environment:
question is, w
> -Original Message-
> From: Raja Gopal [mailto:[EMAIL PROTECTED]]
> Subject: Request from Beginner
>
> Hello All,
>
> I would like to learn PERL for handling files.
> (Open, edit, close, write, delete some lines, pattern
> matching..etc). I did search in the net (using
> Google.com)
Hi,
I believe it is possible to access an array through a variable, but I'm
ghaving trouble doing it.
I want to read in a text file and display it, on line at a time, depending
on an
increment counter triggered by a 'next' or 'previous' button.
I am trying to do this with Perl/Tk, but it fails
Hello,
I'm not sure how you're referecing @Array, but the loop you want probably
looks like
foreach $line (@Array) {
#your code to deal with $line goes here
}
In that loop, $line will equal each line of your input file, in turn.
So, just call split on $line and deal with the data in sequence
Hello,
You can use the split() function to seperate each string by a delimiting
character, such as a comma.
For example, in your first line--
Tomy Savage:408-724-0140:1222 Oxbow Court,
Sunnyvale,CA 94087:5/19/66:34200
Given that the fields you want are always before, and directly after the
secon
> -Original Message-
> From: Jorge Goncalvez [mailto:[EMAIL PROTECTED]]
> Subject: re:Regexp needed
>
>
> hi, i have this:
> my ($Path) = $MountsPath =~ /(.+?)cygwin/;
> but I wanted to get rid of the "/".
> because $MountsPath could be c:/cygwin or c:/xyz/cygwin or
> c:/xyz/zyx/cygwin
my $dbh = DBI->connect ( "DBD:mysql :database=perl
:host=localhost",$username,$password)
^^^
|
should read DBI::mysql
The syntax is:
$dbh = DBI->connect(DBI:driver_name:database=database_name, username,
password)
The default h
From: "Ben Nospam" <[EMAIL PROTECTED]>
> I'm interested in accessing COM from Perl. This newsgroup led me to have a look at
>Dave Roth's Win32
> Perl: the Standard Extensions 2nd ed. but browsing its contents on
> amazon, I didn't see any mention of COM.
Look for OLE instead. (OLE is an old
From: "Frank 'Olorin' Rizzi" <[EMAIL PROTECTED]>
> So, I love DBM files,
> because I think they'll work just great for the application I have to
> develop.
>
> So far I worked with simple hashes (key => value) on DBM files, and
> everything seems fine. However, I now realize I need to complicate
Hello,
Here is some info about opening and closing files.
You can open a file by using the following syntax:
open(DOG,"/home/scotty/data/dogs") || die "Couldn't open DOG.\n";
To Close a file use:
close(DOG);
For File Globbing try:
while($x = ) {
open(FILE,"$x") || die "Couldn't op
Hello All,
I would like to learn PERL for handling files.
(Open, edit, close, write, delete some lines, pattern
matching..etc). I did search in the net (using
Google.com).But I couldn't find the tutorial/e-book
which helps beginner (like me) to learn the basics,
becoz there are so many websit
> I'm very beginer in perl...
Welcome
> before this I did know asp and java and java
> script for client side...
How did you forget them again? ("...I did know...")
> now I want switch to perl language and I have
> several easy question about that ...
perl = compiler/intepreter that runs Pe
> I'm very beginer in perl...
Welcome
> before this I did know asp and java and java
> script for client side...
How did you forget them again? ("...I did know...")
> now I want switch to perl language and I have
> several easy question about that ...
perl = compiler/intepreter that runs Pe
From: Jorge Goncalvez <[EMAIL PROTECTED]>
> Hi, I wanted to create a package like this:
>
>
> use GetMyRegPath;
>
> but it fails and i have this why?
> thanks
>
> GetMyRegPath.pm did not return a true value at bootnet3.pl line 40.
The last command in the GetMyRegPath.pm sho
hi, i have this:
my ($Path) = $MountsPath =~ /(.+?)cygwin/;
but I wanted to get rid of the "/".
because $MountsPath could be c:/cygwin or c:/xyz/cygwin or c:/xyz/zyx/cygwin and
i wanted $Path = c: or c:/xyz or c:/xyz/zyx .
And now $Path= c:/ or c:/xyz or c:/xyz/zyx.
How can I do ?
thanks.
--
T
On Tuesday 05 March 2002 02:23 am, nafiseh saberi wrote:
> hi.
> what is the advantages of perl/cgi
> in compare with asp ??
It's free
see also PHP
--
Robert Brandtjen
--
Web Site Creation and Hosting Services
[EMAIL PROTECTED]
www.prometheusmedia.com
--
Hi, I wanted to create a package like this:
package GetMyRegPath;
use Win32::Registry;
sub GetCygwinMountsPath(){
my %Vals = ();
my $RegPath = "SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\/";
$main::HKEY_LOCAL_MACHINE->Open($RegPath, my $MountsKey) || die "Couldn't
open $RegPath\n";
$
Tor Hildrum wrote:
>
> #!/usr/bin/perl -w
> use strict;
> use warnings;
>
> print "What file do you want to open?\n";
> chomp(my $openfile = );
> print "What file do you want to write to?\n";
> chomp(my $outfile = );
> print "What do you want to replace in the first file?\n";
> chomp(my $pattern
#!/usr/bin/perl -w
use strict;
use warnings;
print "What file do you want to open?\n";
chomp(my $openfile = );
print "What file do you want to write to?\n";
chomp(my $outfile = );
print "What do you want to replace in the first file?\n";
chomp(my $pattern = );
print "What do you want to replace i
hi.
what is the advantages of perl/cgi
in compare with asp ??
thx.
64 matches
Mail list logo