Hi,
FamiLink Admin <[EMAIL PROTECTED]> asked:
> I am trying to connect to a database using a small script but get this
> error:
>
> failed: Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' perl
Try
mysql> show variables like 'socket';
+---+-
On Wednesday 14 March 2007 09:10, siegfried wrote:
> I'm downloading a lot of debian images using wget these days. Can anyone
> suggest where I might look to find a little perl script that will download
> a web page, look for all the links containing ".iso" and then reinvent wget
> to download them
I am trying to connect to a database using a small script but get this
error:
failed: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' perl
#!/usr/bin/perl
use strict;
use warnings;
use DBI;
$ENV{MYSQL_UNIX_PORT} = "/var/lib/mysql/mysql.sock";
my $dsn = "DBI:mysq
On 3/14/07, siegfried <[EMAIL PROTECTED]> wrote:
I'm looking at http://cpan.org/scripts/Networking/index.html and I don't see
any obvious scripts that would meet my need. I'm looking for a script that
would scrape a web page for all the downloadable iso files and download
them.
I would sugges
Thanks. That's what I thought it was doing but wasn't sure.
Mathew
John W. Krahn wrote:
> Mathew Snyder wrote:
>> my $timeworked = {};
>
> In this context they represent an anonymous hash, the reference of which is
> assigned to the scalar variable. It is usually not necessary because of
> aut
Mathew Snyder wrote:
> my $timeworked = {};
In this context they represent an anonymous hash, the reference of which is
assigned to the scalar variable. It is usually not necessary because of
autovivification.
John
--
Perl isn't a toolbox, but a small machine shop where you can special-order
c
> "Grant" == Grant <[EMAIL PROTECTED]> writes:
Grant> Hello, I need to do some special processing if the domain of a URL
Grant> string matches a set of possible values. I'd like to catch http and
Grant> https. What is the best way to do that?
Keep in mind that www.stonehenge.com can be wri
my $timeworked = {};
Mathew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
My fault. The reason it does not match is the colon placement. It will
match http//:images.google.
Thanks, I really should have noticed that myself.
- Grant
> Can you correct my syntax? I can't get this to match:
>
> if ($Scratch->{url} =~ /^https?\/\/:images\.google\./) {
>
> The value of r
> -Original Message-
> From: Beginner [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 14, 2007 10:56
> To: beginners@perl.org
> Subject: polling a directory
>
> Hi,
>
> I am trying to find a means of monitoring a directory for activity. I
> would like a perl process to aware if a fil
I did something similar...
What I would do it wget the webpage, go through the page with RegEx
and look for ] "[^"].iso" and stick the URLs into a text
file. Then feed the textfile to wget (-i switch) and you're done ;)
On 3/14/07, siegfried <[EMAIL PROTECTED]> wrote:
I'm downloading a lot of de
My fault. The reason it does not match is the colon placement. It will
match http//:images.google.
Can you correct my syntax? I can't get this to match:
if ($Scratch->{url} =~ /^https?\/\/:images\.google\./) {
The value of referrer is exactly:
http://images.google.
--
To unsubscribe, e-mai
On 2007/03/14, at 17:55, Beginner wrote:
Hi,
I am trying to find a means of monitoring a directory for activity. I
would like a perl process to aware if a file has been dropped into a
specific folder and then take some action.
In the past I have used cron for this but I was thinking this isn'
On 2007/03/14, at 16:00, yitzle wrote:
regex.
if ( m/^https?\/\/:blah\.com/)
my @possible_values = qw{
http://www.google.com
https://my.domain.
http://some.other.domain.net
};
my @urls = qw{
http://www.google.com/?some_bizarre_args
https://my.domain.com
https://my.domain.net
h
Hi,
I am trying to find a means of monitoring a directory for activity. I
would like a perl process to aware if a file has been dropped into a
specific folder and then take some action.
In the past I have used cron for this but I was thinking this isn't
the best choice because 1) You have to s
On 2007/03/14, at 17:43, Tom Smith wrote:
Thank for the reply...
I actually use Twiki internally, for our Corporate Intranet. I have
looked at Bricolage, but I don't think it suites my needs (though
it looks like an awesome piece of software).
The bottom line is that I'm not very profici
Igor Sutton Lopes wrote:
On 2007/03/14, at 17:13, Tom Smith wrote:
I've been trying to find a good Perl-based content manager. There are
a myriad of PHP ones available, complete with site design templates
and such (like phpWebSite and Joomla)--but Perl-based ones seem to be
pretty sparse.
regex.
if ( m/^https?\/\/:blah\.com/)
Can you correct my syntax? I can't get this to match:
if ($Scratch->{url} =~ /^https?\/\/:images\.google\./) {
The value of referrer is exactly:
http://images.google.
- Grant
> Hello, I need to do some special processing if the domain of a URL
> strin
On 2007/03/14, at 17:13, Tom Smith wrote:
I've been trying to find a good Perl-based content manager. There
are a myriad of PHP ones available, complete with site design
templates and such (like phpWebSite and Joomla)--but Perl-based
ones seem to be pretty sparse.
I was really hoping to
I've been trying to find a good Perl-based content manager. There are a
myriad of PHP ones available, complete with site design templates and
such (like phpWebSite and Joomla)--but Perl-based ones seem to be pretty
sparse.
I was really hoping to go Perl-based with the CMS, but if I can't... I
On Wed, 14 Mar 2007, Dharshana Eswaran wrote:
On 3/13/07, Tom Phoenix <[EMAIL PROTECTED]> wrote:
On 3/13/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote:
> I was going thro the topic "Accessing packed data structures" in the
Perl
> Complete Reference Book. I came across this example:
>
>
On 3/14/07, louis fridkis <[EMAIL PROTECTED]> wrote:
Why does Perl say 10.2 is 10.199
Because it is.
Within the limits of precision of your floating point format, you're
talking about the same number.
This isn't just Perl; every programming language has _something_ like
this. Some hi
On 03/14/2007 11:19 AM, louis fridkis wrote:
Why does Perl say 10.2 is 10.199
Here is example code and output:
#!/usr/bin/perl -w
$add = 10.2;
print "$add\n";
printf "$add\n";
printf ("%40.35f\n", $add);
perl add1.pl
10.2
10.2
10.19928945726423989981413
If you have the
On 2007/03/14, at 16:10, siegfried wrote:
I'm downloading a lot of debian images using wget these days. Can
anyone
suggest where I might look to find a little perl script that will
download a
web page, look for all the links containing ".iso" and then
reinvent wget to
download them all?
On 2007/03/14, at 15:55, Jeff Pang wrote:
Hello,
I just think regex is the best way since you choose to use Perl
doing this work.
Regexp::Common::URI may be what you're looking for.
--
Igor Sutton
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
I'm looking at http://cpan.org/scripts/Networking/index.html and I don't see
any obvious scripts that would meet my need. I'm looking for a script that
would scrape a web page for all the downloadable iso files and download
them.
Can someone recommend such a script? Are there some other good pe
Why does Perl say 10.2 is 10.199
Here is example code and output:
#!/usr/bin/perl -w
$add = 10.2;
print "$add\n";
printf "$add\n";
printf ("%40.35f\n", $add);
perl add1.pl
10.2
10.2
10.19928945726423989981413
--
Lou Fridkis
Human Genetics
57920
I'm downloading a lot of debian images using wget these days. Can anyone
suggest where I might look to find a little perl script that will download a
web page, look for all the links containing ".iso" and then reinvent wget to
download them all?
Assuming such a script does not exist, can someon
regex.
if ( m/^https?\/\/:blah\.com/)
Ok, how can I pass in the value I want evaluated? Sorry I'm such a beginner.
- Grant
> Hello, I need to do some special processing if the domain of a URL
> string matches a set of possible values. I'd like to catch http and
> https. What is the best wa
regex.
if ( m/^https?\/\/:blah\.com/)
On 3/14/07, Grant <[EMAIL PROTECTED]> wrote:
Hello, I need to do some special processing if the domain of a URL
string matches a set of possible values. I'd like to catch http and
https. What is the best way to do that?
- Grant
--
To unsubscribe, e-mai
>
>Hello, I need to do some special processing if the domain of a URL
>string matches a set of possible values. I'd like to catch http and
>https. What is the best way to do that?
>
Hello,
I just think regex is the best way since you choose to use Perl doing this work.
--
To unsubscribe, e-m
Hello, I need to do some special processing if the domain of a URL
string matches a set of possible values. I'd like to catch http and
https. What is the best way to do that?
- Grant
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.pe
> ""Mumia" == "Mumia W " writes:
"Mumia> On 03/13/2007 07:44 PM, Hardly Armchair wrote:
>> Hello List,
>> I have a data structure containing a bunch of strings in different groups:
>> [...]
>> I want these sorted first alphabetically within the group, and then
>> according to the number of me
> ""Mumia" == "Mumia W " writes:
"Mumia> $dsn and $dbh are lexical variables that are restricted to dbcon.pl.
You might
"Mumia> want to consider using package variables. e.g:
Or, just figure out how to break apart your program properly.
Export behavior, not data. Create a package that pro
On 3/14/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote:
snip
> The data which i need to pack and unpack to these elements are in hex
> format(0x0B 0x1C 0x34 etc). It is a string of hex bytes.
>
Can i know about the format in which i need to supply the input? Coz i am
unable to accept the hex st
On 03/14/2007 05:37 AM, Umar Draz wrote:
HI dear members! I have a file called dbcon.pl into include directory.
#!/usr/local/bin/perl
use DBI;
# Database Username, Password and Driver settings
my $user="konsole";
my $pass="send";
my $host="localhost";
my $driver="mysql";
my $db="treat";
my $tn
-Original Message-
>From: Umar Draz <[EMAIL PROTECTED]>
>Sent: Mar 14, 2007 6:37 PM
>To: beginners@perl.org
>Subject: how to use require??
>
>HI dear members! I have a file called dbcon.pl into include directory.
>
>#!/usr/local/bin/perl
>
>use DBI;
>
># Database Username, Password and Dr
HI dear members! I have a file called dbcon.pl into include directory.
#!/usr/local/bin/perl
use DBI;
# Database Username, Password and Driver settings
my $user="konsole";
my $pass="send";
my $host="localhost";
my $driver="mysql";
my $db="treat";
my $tnt="xyz";
# Connect Database
my $dsn = "DBI
From: "Dharshana Eswaran" <[EMAIL PROTECTED]>
> I was going thro the topic "Accessing packed data structures" in the Perl
> Complete Reference Book. I came across this example:
>
> struct utmp {
> char ut_user[8]; /* User login name */
> char ut_id[4]; /* /etc/inittab id */
> char ut_line[12]; /*
39 matches
Mail list logo