i have a whole collection of scripts that does this... at home.
it's been quite a while but i believe what you want is
$dbh-commit;
$dbh-disconnect'
to close a particular connection.
hopefully someone can verify/correct
http://search.cpan.org/~timb/DBI-1.620/DBI.pm
will document all the details
i have csv files in the following format, where some fields are
enclosed in double quotes if they have commas embedded in them and all
other fields are simply comma-delimited without any encapsulation,
such as
some,data,more,data,numbers,etc,data with a , in the
datastream,yet more
i appreciate the tips. unfortunately, adding modules to this server
is not currently possible. does anyone have a more 'hands-on'
solution?
On Fri, Nov 5, 2010 at 8:53 AM, Shawn H Corey shawnhco...@gmail.com wrote:
On 10-11-05 09:34 AM, jm wrote:
i have csv files in the following format
all,
below is a sub i created to try to properly capitalize surnames of
irish/scottish descent, converting Macarthur = MacArthur, o'donnell
= O'Donnell, etc.
it works as intended but i was wondering if anyone can suggest
improvements in size and efficiency (realizing the two are not
necessarily
On Thu, Oct 7, 2010 at 1:22 PM, Shawn H Corey shawnhco...@gmail.com wrote:
On 10-10-07 02:08 PM, jm wrote:
it works as intended but i was wondering if anyone can suggest
improvements in size and efficiency
See `perldoc perlre` and search for /\\u/, /\\U/, /\\l/, and /\\L/.
--
Just my
On Thu, Oct 7, 2010 at 3:01 PM, Jim Gibson jimsgib...@gmail.com wrote:
On 10/7/10 Thu Oct 7, 2010 12:20 PM, jm jm5...@gmail.com scribbled:
Shawn and John,
thanks, your leads gave me this:
#
#!/usr/bin/perl
print surname($ARGV[0]) . \n
thought
if this person really believes he has any expectation of privacy regarding
any aspect of the internet, then i have some prime swampland in the sahara
i'd love to sell him
end thought
good luck with that
On Tue, Jan 5, 2010 at 11:16 PM, jay taylor jaytay2...@yahoo.com wrote:
Hello,
I
your last field included in the query ('msg') has an apostrophe in the
middle of the text, as well as not be closed with a single quote before the
entire string is closed with the double quote. you can't include an
unescaped single quote inside a single-quoted string, nor can you include an
not sure, but try
print $File\n;
including the var in the quotes may take care of the problem
On Tue, Oct 13, 2009 at 8:34 AM, ckn...@savage.za.org wrote:
Hi,
I have the following code:
#!/usr/bin/perl
use diagnostics;
use strict;
use warnings;
my @Files = /flows/ft*;
foreach my
On Tue, Sep 22, 2009 at 9:37 AM, Thomas Bätzler t.baetz...@bringe.comwrote:
Ian pcs...@gmail.com wrote:
Keep it up and the hollier-than-though's will have the list to themselves
eventually.
What's holly got to do with it, though? ;-)
SCNR,
Thomas ;-)
i think hollier-than-though is
On Sun, Sep 20, 2009 at 11:12 AM, Shawn H Corey shawnhco...@gmail.comwrote:
Telemachus wrote:
On Sun Sep 20 2009 @ 10:13, Shawn H Corey wrote:
Telemachus wrote:
Ok, I'll bite: do you really mean to say that it's a crime somewhere to
put
this bullshit drivel into an email and then send
this is what i use for all my scripts. note there are 2 underscores _
before and after FILE
my $program_name = __FILE__;
$program_name =~ s/^.*\///;# remove all path, leaving only actual
program name
On Fri, Aug 21, 2009 at 1:52 PM, pdfe...@aep.com wrote:
Hi All,
I am about as
On Wed, May 27, 2009 at 4:21 AM, Raymond Wan r@aist.go.jp wrote:
Hi Joe,
jm wrote:
then the head ... /head code does not process correctly; it is
ignored unless there is a 2nd pair of head/head tags in the print
statement (perl inline html)
In addition to Gunnar's questions, if you
i had actually tried to include that early on but apparently the stars
weren't properly aligned just then. that works perfectly. thanks for
making me revisit that option. i figured it would be something
simple, just threw me off since it hasn't ever been required when i do
all the coding inside
i've created a module, part of which creates the beginning of a web
page. the module overall works fine. the sub in question even works
fine, except for one point. here's the sub in the module:
sub html_start
{
my %options = @_;
# $options{title} = page title
@aist.go.jp wrote:
Hi Joe,
jm wrote:
why do the head tags in the sub work and the page display perfectly
with the additional empty head tags, yet only print out the code as
ascii output when i remove the 2nd set of head tags? why are the
head tags in the sub not considered legitimate html code
On Wed, Mar 11, 2009 at 4:35 PM, Aglipay, Recelyn
recelyn.agli...@ehmc.com wrote:
Hello everyone,
I'm a beginner and having some issues with a Perl Script I had written
for work.
I am trying to print to a network label printer. I've verified that the
printer is working on its own.
But
for CGI i don't believe there is anything like you are requesting - that
would be addressed in javascript. however, you can name the params in each
form as formA_parameter, parameter_formA, or something similar
and search like:
if (param(formA_parameter))
{
...
}
though if you're
there is a LIMIT option for the SELECT statement that will return the
number of records you desire.
$sth = $dbh-prepare(select whatever from table optional WHERE
arguments LIMIT desired number of records);
$sth-execute();
while ($vars ...) = $sth-fetchrow_array())
{
}
# or whatever syntax best
IO::Tee allows STDOUT as one of your output options
On Mon, Aug 4, 2008 at 9:47 AM, Hashmat Khan [EMAIL PROTECTED] wrote:
Hi,
Has anybody used Telnet ?
I want to know, how can we redirect the output to STDOUT instead of
log file ? (Dump_Log = dump.txt)
thanks,
Hashmat
--
To
does anyone have a sample script for a 3270 connection via perl?
i've read all i can find for the x3270, x3270-script, c3270, etc. but
i can't quite wrap my head around how the scripting should work. i've
done telnet connections with Net::telnet so i am familiar with the
basics but i can't find
On Thu, May 29, 2008 at 4:58 PM, Ken Foskey [EMAIL PROTECTED] wrote:
On Thu, 2008-05-29 at 15:23 -0500, jm wrote:
does anyone have a sample script for a 3270 connection via perl?
i've read all i can find for the x3270, x3270-script, c3270, etc. but
i can't quite wrap my head around how
i need to extract data from websites, tracking the status of various
shipments. i'm aware of the LWP module but wondered how many other
modules may be useful. i've just glanced over the LWP documentation
(not in-depth at all yet) and i'm not sure if it will actually allow
me to pull the bits of
On Jan 21, 2008 12:39 PM, Chas. Owens [EMAIL PROTECTED] wrote:
On Jan 21, 2008 1:21 PM, jm [EMAIL PROTECTED] wrote:
i need to extract data from websites, tracking the status of various
shipments. i'm aware of the LWP module but wondered how many other
modules may be useful. i've just
by strange coincidence, i just picked up where i had left off reading
Minimal Perl by Tim Maher, which goes into some detail about
replacing grep (among other functionalities) with either perl
one-liners or scripts, depending on preference/need. this book may
well be worth your time and money.
the biggest consideration will be that every machine that runs your
program will have to have Perl (Activestate Perl for windows)
installed on that machine since it will (presumably) be an interpreted
script rather than a compiled, stand-alone program. you will also
need tcl-tk or whatever
if you have access to the mysql client and server you don't need any
modules, just use the load data sql command with all the requisite
parameters.
if you need to make a perl script for it, just use the standard dbd
(or dbi, i forget currently which is parent to which) module to
connect, then use
i have used this, just to display all param()s and verify the data
being passed. i'm thinking someone showed me a newer version for
looking at multiple values for checkboxes, etc. but i'm not sure and i
don't have more recent code available to verify.
hope this helps
#
foreach my
look at Mail::Sender
On 4/28/07, Mathew [EMAIL PROTECTED] wrote:
I have a script which creates a text file for each of several users.
However, the contents of the file are rarely enough to warrant it. I'd
much rather place the information inside the email instead of attaching
it as a file.
below is a very simple testing script to display and select multiple options
from a list of checkboxes. the first grouping all use the same checkbox
name sitelist for each checkbox, the second grouping uses a different name
for each checkbox. the first group only returns the first selection,
On 4/9/07, Tom Phoenix [EMAIL PROTECTED] wrote:
On 4/9/07, jm [EMAIL PROTECTED] wrote:
the first group only returns the first selection,
regardless of how many are chosen.
Use the param() function in list context, not scalar; see the CGI
module's documentation. The example in the synopsis
file says the command was exicuted but the array didn't pick
it up.
Don Dukelow
-Original Message-
From: jm [mailto:[EMAIL PROTECTED]
Sent: Monday, March 26, 2007 5:13 PM
To: beginners@perl.org
Subject: Re: Telnet question in Perl
the /s i was referring to are in your 'waitfor' texts
sudo to root
thaat I have this problem.
Don Dukelow
-Original Message-
From: jm [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 27, 2007 12:01 PM
To: Beginners List
Subject: Re: Telnet question in Perl
i can't find any reference to a cmw option so i'll assume that's a
typo for cmd
simplest questions first...
is sudo a valid command on that particular system?
if so, is sudo su - a valid syntax in that environment?
is /Password/ a valid prompt being returned by that system?
should the /s be a part of the prompt text?
i've never included /s in my expected returns unless
what I ended up with.
Don Dukelow
-Original Message-
From: jm [mailto:[EMAIL PROTECTED]
Sent: Monday, March 26, 2007 4:22 PM
To: beginners@perl.org
Subject: Re: Telnet question in Perl
simplest questions first...
is sudo a valid command on that particular system?
if so, is sudo su - a valid
Given the case,
my @array = (1,2,3,4);
my $var1 = [EMAIL PROTECTED];
my $var2 = [EMAIL PROTECTED];
What's the difference between $var1 and $var2?
Are they all refered to @array?
Thanks guys.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello,
Consider this script (coming from Randal's book):
{ package Animal;
sub speak {
my $class = shift;
print a $class goes , $class-sound, !\n;
}
}
{ package Mouse;
@ISA = qw(Animal);
sub sound { squeak }
sub speak {
my $class = shift;
$class-SUPER::speak(@_); #***the
Hello members,
What's the difference between Perl's reference and C's pointer?
I'm always confused about them.Thanks for any direction.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
hello lists,
please see the codes below:
use strict;
use warnings;
my @arr = ();
open HD,itemid.txt or die $!;
while(HD){
chomp;
push @arr,$_;
}
close HD;
print @arr;
the itemid.txt has 470 lines data,looks like:
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
But
1692
1693
$ perl test.pl
1693
It's really happened to me.So faint!
2007/3/16, Rob Dixon [EMAIL PROTECTED]:
Jm lists wrote:
hello lists,
please see the codes below:
use strict;
use warnings;
my @arr = ();
open HD,itemid.txt or die $!;
while(HD){
chomp;
push @arr,$_;
}
close HD
source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.
$ uname -r
2.6.17.4
2007/3/16, Rob Dixon [EMAIL PROTECTED]:
Jm
Thanks John.That's the right way.
Another question,what's the regex of \s+\z ?
2007/3/16, John W. Krahn [EMAIL PROTECTED]:
Jm lists wrote:
hello lists,
Hello,
please see the codes below:
use strict;
use warnings;
my @arr = ();
open HD,itemid.txt or die $!;
while(HD){
chomp
below is what i've worked out so far, just not sure how the next step needs
to be done.
i'm building a dropdown list ($dropdown) consisting of a number of options
($dropdown_value); once a value is selected i want to immediately create and
display a form consisting of data relevant to that
Whoops, that is the 64-bit version. This the normal version:
http://downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-5.8.8.820-MSWin32-x86-274739.msi
Do I need to pay for it?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello,
$s=hello,test;
the 1st statement:
$s=~s/^(\w+)/$1 /
the 2nd statement:
$s=~s/^(\w+)/\1 /
What's the difference between these two statements?
Thanks!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
is there a function, module, script, etc. that converts all uppercase to
proper mixed case. this particular need is for an address list that is all
uppercase
1370 W 14TH ST
ADA,OK
74837
i would like to convert it to
1370 W. 14th St.
Ada, OK
74837
thanks for any help,
joe
--
since this is a
Ferreira [EMAIL PROTECTED] wrote:
On 2/26/07, jm [EMAIL PROTECTED] wrote:
is there a function, module, script, etc. that converts all uppercase to
proper mixed case. this particular need is for an address list that is
all
uppercase
Doing it blindly, can be easily achieved with regexes
Hello lists,
I want to get all the files on some a webdir.For example:
http://www.foo.com/bar/
But that dir has a default page index.htm.So when I accessed the url
I only got the default page.
Can you tell me is there a way to fetch all the files in that dir?Thanks a lot.
--
To unsubscribe,
hello,lists,
When I said:
die usage: $0 pub|del;
I got this output:
usage: xxx.pl pub|del at xxx.pl line 20.
Then when I said:
die usage: $0 pub|del\n;
Only the \n was added.The output became:
usage: xxx.pl pub|del
It lost the words of at xxx.pl line 20..
Why is this?Thank you.
Hello,
I wrote these codes in my CGI scripts:
my $percent = sprintf(%.2f\%,$count/$total * 100);
Then I print the $percent to web and get the results correctly like:
12.41%
But when I looked at error_log,I got many error warnings:
Invalid conversion in sprintf: end of string at
Hello,
I have a XML file which needed to be posted to a remote site.
I have no idea on how to do it.Can you show me some useful reference?Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hello members,
I'm really confused for all the kinds of uri encoding.Can you please
help me again about the uri charset below?
http://www.example.com/so/index?key=%BD%F1%C8%D5%C5%C5%D0%D0viewlist=1
what's the encode format for %BD%F1%C8%D5%C5%C5%D0%D0 ?Thank you.
--
To unsubscribe, e-mail:
also be aware that in previous versions of CUPS there was a native
ability to print directly to a file; per the cups users group it was
removed at some point because too many people were complaining about
how difficult/unintuitive it was (seems like if i could figure it out
at the time, anybody
http://search.cn.yahoo.com/search?p=%E9%A3%9E%E8%BD%AE%E6%B5%B7%E6%B5%B7%E6%8A%A5pid=65226_1006ei=UTF-8
What's the encode format for the
%E9%A3%9E%E8%BD%AE%E6%B5%B7%E6%B5%B7%E6%8A%A5 in above string?I
tried some ways but got nothing.
Please help,thanks.
--
To unsubscribe, e-mail: [EMAIL
Hello members,
When I run:
$ perl -c myscript.pl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = en_US.en
are supported and installed on your system.
perl: warning: Falling back to
Hello,
Can you tell me what's this string?
=?GBK?B?zNSxpszh0NHE+qO6wvS80tLRvq3GwLzbo6zH67vYxsA=?=
How to decode it?I try:
$ perl -MEncode -le 'print
encode(utf8,decode(gbk,=?GBK?B?zNSxpszh0NHE+qO6wvS80tLRvq3GwLzbo6zH67vYxsA=?=))'
But I can't get the result correctly.
Thanks for your
Hi members,
I want to get this format of time:
11.07.06 12:00 pm
can you tell me how to get it?(maybe need to be translated from the
'localtime') Thanks.
Very cool!Thanks.
2006/11/15, Ricardo SIGNES [EMAIL PROTECTED]:
* Jm lists [EMAIL PROTECTED] [2006-11-15T09:57:44]
Hi members,
I want to get this format of time:
11.07.06 12:00 pm
can you tell me how to get it?(maybe need to be translated from the
'localtime') Thanks.
Consult perldoc
hello members,
I want to install some perl libs under my home dir since I don't have the
root privileges.
Can you tell me how to do it other than the method of perl -MCPAN -e
shell?Thanks.
thanks to everyone for the suggestions
On 11/1/06, Mumia W. [EMAIL PROTECTED] wrote:
On 11/01/2006 01:44 PM, jm wrote:
On 11/1/06, John W. Krahn [EMAIL PROTECTED] wrote:
Use a hash:
my %oob = (
state = 'IL',
lata = 732,
name = 'SomeName',
);
If you don't think
i'm trying to build variables dynamically from data passed to a
subroutine. i pass a text value (a field from a database) and want to
build an associated variable name by appending a prefix to the field
name ($oob_fieldname). that constructed variable would then acquire
the value of the
On 11/1/06, John W. Krahn [EMAIL PROTECTED] wrote:
Use a hash:
my %oob = (
state = 'IL',
lata = 732,
name = 'SomeName',
);
If you don't think that you need a hash then be aware that what you are trying
to do is actually using a hash anyways (the %main:: hash.)
John
--
first, sharing the error message you get when trying to connect will
help isolate the actual cause of the problem.
second, getting rid of all the extraneous whitespace in your code
fragment will help in reading the code.
as for possible causes of the error:
1. DBI-connect syntax may be
On 8/30/06, Manne, Siva Chaitanya Prasad
[EMAIL PROTECTED] wrote:
Hi,
I would like to connect to a database stored at linux
machine from my Windows machine. But I am unable to connect to the
mysql
server.
The error I am getting is
DBI
i use Net::Telnet to connect to a server and run tests for several
hours. the script will normally die in various places in the script,
apparently due to losing connection to the server.
i found in the documentation about changing Net::Telnet's Errmode to
'return' so it will return to the
thanks for the inputs. what i've been able to glean so far indicates
i need the full oracle client and development softwares, so i guess i
need to dig deeper in-house to see where i can get these.
On 2/9/06, Bob Showalter [EMAIL PROTECTED] wrote:
jm wrote:
On 2/9/06, Bob Showalter [EMAIL
i've asked oracle's forums and gotten nothing useful, so hopefully
someone here can help...
i have scripts that connect to mysql; they need to connect to an
oracle server. i've tried installing DBD::Oracle from cpan, and get
an error message about The ORACLE_HOME environment variable value
On 2/9/06, Bob Showalter [EMAIL PROTECTED] wrote:
jm wrote:
i've asked oracle's forums and gotten nothing useful, so hopefully
someone here can help...
i have scripts that connect to mysql; they need to connect to an
oracle server. i've tried installing DBD::Oracle from cpan, and get
On 2/9/06, jm [EMAIL PROTECTED] wrote:
On 2/9/06, Bob Showalter [EMAIL PROTECTED] wrote:
jm wrote:
i've asked oracle's forums and gotten nothing useful, so hopefully
someone here can help...
i have scripts that connect to mysql; they need to connect to an
oracle server. i've
according to Programming Perl (p. 98)...
-w = file is writable by effective uid/gid
-s = file has nonzero size (returns size)
-w only tells if the file's permissions allow it to be written to, has
nothing to do with whether or not it already has data.
save the return value of -s and check that
i'm modifying a script to run on a sun box that i do not have
privileges to install modules in the normal perl paths. subsequently
i installed DBI.pm into a modules subdir under my home dir. below are
the 2 relevant lines:
use lib $ENV{HOME}/modules/DBI;
our $mysql_dbh =
On 10/28/05, Wiggins d'Anconia [EMAIL PROTECTED] wrote:
That seems like a very odd error. One thing I do notice is that you are
including DBI in the path to 'use lib'. This would have to mean that
the DBI module lives in $ENV{HOME}/modules/DBI/DBI.pm. Is that the
case? Or should your use lib
Yep. Your best bet is to use CPAN to install the module. One of its
configuration parameters will allow you to specify a prefix of where to
install modules, specifically 'makepl_arg'.
Check the archives of this list or google for further information. How
to install modules into a
not sure how you would work your version, but here is what i use all
the time, maybe it will be easier for you as well...
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime;
my $am_pm = $hour 11 ? PM : AM;
$year += 1900;
$mon += 1;
$sec = 0 . $sec if $sec 10;
$min =
this is what i use to get date/time; something different that may be of benefit
use POSIX 'strftime';
sub timestamp
{
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
localtime;
my $am_pm = $hour 11 ? PM : AM;
$year +=
not sure about the rest of its name but at least it got the b0y
right (unless it's also gender- as well as maturity-challenged, of
course)
On 7/17/05, x0x_t3chn0b0y_x0x [EMAIL PROTECTED] wrote:
FUCKERS REMOVE ME
IF USED THE UNSUBSCRIBE IT DONT WORK
FUCKERS REMOVE ME
IF USED THE UNSUBSCRIBE
On 6/14/05, Praedor Atrebates [EMAIL PROTECTED] wrote:
On Tuesday 14 June 2005 16:37, Wagner, David --- Senior Programmer Analyst ---
WGO wrote:
[...]
I have this (pertinent) code in my script:
$dnakmotif ='[KRH][L{3,}V{3,}I{3,}F{3,}Y{3,}A{3,}][KRH];
$dnakmotif
select fields list from db.table where date_field
date_sub(curdate(), interval 3 month);
give that a shot
On 6/9/05, Graeme McLaren [EMAIL PROTECTED] wrote:
Hi all, wondering if anyone can help me out with a mysql query (bit off
topic I know)
select id, title,
i'm trying to script - using net::telnet - an automated connection to a
microsoft telnet server. following the example in the net::telnet
documentation, i can get the necessary telnet options set before and just
after connecting to the server (environ, echo, escape, etc... options) but
the
79 matches
Mail list logo