"Keith Olmstead" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> Been searching though this list for awhile now, and now I am needing some
help. I am not asking for someone to do my code for me, I am trying to
learn perl and the only way for me to do that is to dive staig
Is there a way to assign a single value to a list? other then doing the
obvious and spelling out each list assignment or running through a loop.
For instance...
my ( $var1, $var2, $var3, ... ) = "Paul"
assigning paul to all variables in the list.
or a more useful example
my ($passed1, $passed2
--- Nigel Peck - MIS Web Design <[EMAIL PROTECTED]> wrote:
> Can someone please remind a forgetful idiot how to get the name of
> the script being run (the file itself)?
>
> Cheers,
> Nigel
>
> MIS Web Design
> http://www.miswebdesign.com/
>
print "Full File name: $0\n";
Forgetfulness does not
Mark Henry wrote:
> Hi All,
>
> Anyone know if it's possible for the return/exit value of a script, in the
> event of success, to be something other than 0?
>
> I want to call, from a shell script, a perl script that determines a
> certain
> record ID from a database. When the ID has been obtai
On Thu, 17 Jul 2003 17:29:49 -0400, "HENRY,MARK (HP-Roseville,ex1)" <[EMAIL
PROTECTED]> wrote:
> Hi All,
>
> Anyone know if it's possible for the return/exit value of a script, in the
> event of success, to be something other than 0?
>
> I want
Hi All,
Anyone know if it's possible for the return/exit value of a script, in the
event of success, to be something other than 0?
I want to call, from a shell script, a perl script that determines a certain
record ID from a database. When the ID has been obtained, the script would
exit, and the
From: "Nigel Peck - MIS Web Design" <[EMAIL PROTECTED]>
> Can someone please remind a forgetful idiot how to get the name of the
> script being run (the file itself)?
$0
See
perldoc perlvar
Jenda
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes
If I understand you're question correctly, you can get the basename of the
script that you are running ( i.e., minus the extension ) with the code:
my ($basename) = fileparse($0, '\..*');
> Anthony (Tony) Esposito
> Senior Technical Consultant
> Inovis(tm)
> 2425 N. Central Expressway, Suite 900
Can someone please remind a forgetful idiot how to get the name of the script being
run (the file itself)?
Cheers,
Nigel
MIS Web Design
http://www.miswebdesign.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I finally got the script to work!! Thanks for all your help and
suggestions.
http://shawn.apocabilly.org/PGP/examples/example2-1.txt
I had to add the line:
binmode STDOUT;
right before the last line:
print $image->png;
A friend of mine was able to get it to work without adding t
Hi Jamie,
On Thu, Jul 17, 2003 at 11:46:08AM -0400, Jamie Risk wrote:
> I'm trying to add HTML anchors to a lines of text. Quick example would be
> to take the line:
>"Search the internet using an engine like Google."
> and turn it into:
>"Search the internet using an engine like href="w
B,
Please post the entire code base of envir.pl. Feel free to obfuscate
any data that it requires. I cannot get the code you posted to fail.
There is something amiss, and we need to see the code to help.
Kristofer.
--- "B. Fongo" <[EMAIL PROTECTED]> wrote:
>
>
> Hello,
>
> I'm working on m
Hello,
Been searching though this list for awhile now, and now I am needing some help. I am
not asking for someone to do my code for me, I am trying to learn perl and the only
way for me to do that is to dive staight into it.
My problem is with the theory of the script that I am trying to wri
Howdy:
I am running PostgreSQL 7.2.1 on RedHat Linux.
I would like to get information from my
tables that include index, primary keys, sequences,
etc. I see that there is a module DDL:Oracle that
does this, but is there one for PostgreSQL? (I'm
using DBI-1.37 for most of my work).
Thanks!
-X
Jenda Krynicky wrote:
>
> From: "John W. Krahn" <[EMAIL PROTECTED]>
> > perldoc -f -C
> >-M Age of file in days when script started.
> >-A Same for access time.
> >-C Same for inode change time.
> >
> >
> > In *nix files do not have a
Hello all,
I'm having some threading issues with perl 5.8 on solaris 9 x86. This problem
does not appear on linux. If anyone can provide any hints, I would be
eternally thankful.
Here's some background:
SunOS load5.**.com 5.9 Generic_112234-05 i86pc i386 i86pc
bash-2.05# perl --version
From: "John W. Krahn" <[EMAIL PROTECTED]>
> perldoc -f -C
>-M Age of file in days when script started.
>-A Same for access time.
>-C Same for inode change time.
>
>
> In *nix files do not have a creation time. You probably want to us
I've no control over the EOL of text files that I'm processing; is there a
conveniant method using chomp() and the INPUT_RECORD_SEPERATOR ($/) to
handle DOS/UNIX/MAC generated text files automatically?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECT
On 17 Jul 2003 08:23:54 -, [EMAIL PROTECTED] (Vemulakonda
Uday Bhaskar) wrote:
>i am tring to tranfer files between two linux systems through
>sftop
>
>i have installed the following modules :
>
>1. Download Net::FTP and Install
>2. Download Net::SFTP .
>
>and the error displayed afte
On Thu, 17 Jul 2003 05:12:16 +, [EMAIL PROTECTED] (Mario Kulka)
wrote:
>I'm trying to set up credit card processing and one of the first steps is to
>establish a "secure socket connection" - how can i do it? (My host does
>support it)
You are not clear which part of the credit card processi
Thank you for your input. I have found a resolution to this issue.
> Anthony (Tony) Esposito
> Senior Technical Consultant
> Inovis(tm)
> 2425 N. Central Expressway, Suite 900
> Richardson, TX 75080
> (972) 643-3115
> [EMAIL PROTECTED]
>
-Original Message-
From: John W. Krahn [ma
Tony Esposito wrote:
>
> Fellow Perl neophytes ( and non-neophytes),
Hello,
> I need a little clarification. I am trying to remove files that are
> greater that 24 hours old. The code snippet below is in a 'while' loop that
> steps through a directory, yet it seems not to work - no fil
Juerg Oehler [mailto:[EMAIL PROTECTED] wrote:
: Sent: Thursday, July 17, 2003 11:09 AM
: To: [EMAIL PROTECTED]
: Subject: fast match count of char in string
:
:
: hi,
:
: how do efficent count char 'a' in string "abdaatela" ?
Plagiarizing from perlfaq4:
"How can I count the number of oc
hi,
how do efficent count char 'a' in string "abdaatela" ?
i guess there are better solutions than:
$tmpstr =~ s/[^a]//g ;
$cnt = length ($tmpstr) ;
print ("found <$cnt> a's <$tmpstr>\n");
thanx
george
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
Good points - thanks for your feedback.
> Anthony (Tony) Esposito
> Senior Technical Consultant
> Inovis(tm)
> 2425 N. Central Expressway, Suite 900
> Richardson, TX 75080
> (972) 643-3115
> [EMAIL PROTECTED]
>
-Original Message-
From: Wagner, David --- Senior Programmer Analyst -
Thank you, Bob. Very helpful information on all fronts.
> Anthony (Tony) Esposito
> Senior Technical Consultant
> Inovis(tm)
> 2425 N. Central Expressway, Suite 900
> Richardson, TX 75080
> (972) 643-3115
> [EMAIL PROTECTED]
>
-Original Message-
From: Bob Showalter [mailto:[EMAIL
Tony Esposito wrote:
> Fellow Perl neophytes ( and non-neophytes),
> I need a little clarification. I am trying to remove files that are
> greater that 24 hours old. The code snippet below is in a 'while'
> loop that steps through a directory, yet it seems not to work - no
> files are remov
James Parsons <[EMAIL PROTECTED]> wrote:
: I have a following in a file
:
: Raw data =
: 18822 188.22
: 133 1.33
: 230023.00
: 222003 `2220.03
:
:
: And when I run the following perl script the
: total is extremely out of wacky, total should
: be
Tony Esposito wrote:
> Fellow Perl neophytes ( and non-neophytes),
> I need a little clarification. I am trying to remove files that are
> greater that 24 hours old. The code snippet below is in a 'while'
> loop that steps through a directory, yet it seems not to work - no
> files are remov
[EMAIL PROTECTED] wrote:
>
> On 17 Jul 2003 08:23:54 -, "vemulakonda uday bhaskar"
> <[EMAIL PROTECTED]> wrote:
>
> >
> > hi all,
> >
> > i am tring to tranfer files between two linux systems through
> > sftop
>
> Please use a more descriptive su
Sylvain masnada wrote:
>
> Hi again and thx John for you help.
> >
> > You could run id inside your perl program.
> >
> > my $id_output = qx/id/;
> I didn't know how to execute a shell command into a perl script, thx.
There are many ways to execute a "shell command" in a perl program, that
is jus
Fellow Perl neophytes ( and non-neophytes),
I need a little clarification. I am trying to remove files that are
greater that 24 hours old. The code snippet below is in a 'while' loop that
steps through a directory, yet it seems not to work - no files are removed
no matter what their 'age'
Jamie Risk wrote:
> er, sorry.
>
> Is there a module to produce html formatted output? If so, would I
> be directed to some documentation?
>
> > > I have to assume that any of the simple HTML-izing I want to do
> > > with simple text files has already been done. I'm guessing
> > > modules, particu
James Parsons wrote:
> Hi everyone..
>
> I'm still a Newbie so be gently
>
>
> I have a following in a file
>
> Raw data =
> 18822 188.22
> 133 1.33
> 230023.00
> 222003 `2220.03
>
>
> And when I run the following perl script the total is extremely
Jamie Risk wrote:
:
: Until now, I've avoided writing modules by inlining the
: deisred code in the new files. Messy. I'm avoiding
: modules for two reasons, laziness and naive conception
: that for what I'm trying to do it's overkill.
Neat! Your first reason is why I use modules.
Charles
Hi everyone..
I'm still a Newbie so be gently
I have a following in a file
Raw data =
18822 188.22
1331.33
2300 23.00
222003 `2220.03
And when I run the following perl script the total is extremely out of
wacky, total should be 2432.58
I'm trying to add HTML anchors to a lines of text. Quick example would be
to take the line:
"Search the internet using an engine like Google."
and turn it into:
"Search the internet using an engine like Google."
In the past, I've contructed hash tables from text files having delimited
key-v
"Paul Archer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thanks a lot! This is just what I was looking for in your first example.
> (The second example won't do me as much good, as I need to consider
> characters that haven't changed inside of a string of characters that
> have-
Thanks a lot! This is just what I was looking for in your first example.
(The second example won't do me as much good, as I need to consider
characters that haven't changed inside of a string of characters that
have--but it's still a good reference.)
Thanks again,
paul
10:11am, Rob Anderson wro
"Sharad Gupta" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Any good books on how to learn perl on windows??.
Learning Perl on Win32 Systems ( O'Reilly ) is pretty good.
Good Luck,
Michèle.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EM
> From: "Jose M.Herrera" <[EMAIL PROTECTED]>
> > I need to make a perl program which print "Changed!" when a file
> > xx.txt is changed. please, any idea??
>
> Since you are using Outlook I assume you want this under Windows,
> right? Take a look at Win32::ChangeNotify module.
No... with RedHat
Hello all!
I have a rather simple question that has me stumped (for about 2 hours now)
I am using the MIME:Lite package
(http://theoryx5.uwinnipeg.ca/CPAN/data/MIME-Lite/MIME/Lite.html) to
Send reports via email from a *nix box.
What I am looking to-do is send the text of a report in the body of
Yeah, I tried that it works fine. I dont know it's probably something
stupid. Even though it throws that error it will adjust the first person
in the passwd files quota, but no one after that. I've even changed the
script to just deal with one person at a time and I get the same error
but it's succ
Pandey Rajeev-A19514 wrote:
Hi,
I want to create differnent Socket Handles in a function and the function creates the created Socket Handle..
my $sock = gensym();
I am getting the same instance of Handle "S".
Please some one tell me how to create different instances of sockets in perl.
Regards
Jamie Risk wrote:
Until now, I've avoided writing modules by inlining the deisred code in the
new files. Messy. I'm avoiding modules for two reasons, laziness and naive
conception that for what I'm trying to do it's overkill.
Thats a dangerous idea.
Is there a method to reference code in other fi
On Thu, 17 Jul 2003 10:39:56 -0400, "Jamie Risk" <[EMAIL PROTECTED]> wrote:
> Until now, I've avoided writing modules by inlining the deisred code in the
> new files. Messy. I'm avoiding modules for two reasons, laziness and naive
> conception tha
Joe Stuart wrote:
I'm trying to implement quota's using the quota interface for perl. The
problem I'm having is when I execute this code.
#!/usr/bin/perl
use Getopt::Std;
use Quota;
getopt("f:s:h:");
die "Usage: $0 -f -s -h \n"
if(!$opt_f || !$opt_s || !$opt_h);
open(PASS, "/etc/passwd
On Wed, 16 Jul 2003 21:33:56 -0400, "Jose M.Herrera" <[EMAIL PROTECTED]> wrote:
> I need to make a perl program which print "Changed!" when a file xx.txt is
> changed.
> please, any idea??
>
> Thanks for all..
>
Usually two-three options with this
Until now, I've avoided writing modules by inlining the deisred code in the
new files. Messy. I'm avoiding modules for two reasons, laziness and naive
conception that for what I'm trying to do it's overkill.
Is there a method to reference code in other files, like, a simple
"include"?
--
To
From: Ramprasad <[EMAIL PROTECTED]>
> You are right it is weird. But just a test script to learn DBI. What I
> really want is how Can I use prepare and execute which I think is
> better than doing a do every time If my table name keeps changing
>
> Is a prepare statement always specific to a table
Gabor Urban wrote:
Hi,
I think the question at hand may be quite simple, though I could not
figure the asnwer out :-))
MyScript.pl runs an other script (foo.pl) with the system call:
system foo.pl arg1 arg2 ;
I would like to have a status report (error flag) from foo.pl, which
does some exit's a
When you prepare a statement and use placeholders (?), they can only be used
for parameters such as "insert into sometable values ( ?, ?, ? )" or "where
somevar = ?". The parameters are bind to the statement when it is executed,
which means it must successfully being prepared already.
The do metho
From: "Jose M.Herrera" <[EMAIL PROTECTED]>
> I need to make a perl program which print "Changed!" when a file
> xx.txt is changed. please, any idea??
Since you are using Outlook I assume you want this under Windows,
right? Take a look at Win32::ChangeNotify module.
Jenda
= [EMAIL PROTECTED]
On 17 Jul 2003 08:23:54 -, "vemulakonda uday bhaskar" <[EMAIL PROTECTED]> wrote:
>
> hi all,
>
> i am tring to tranfer files between two linux systems through
> sftop
Please use a more descriptive subject line, "help me out please" is not te
Hi Ram.
If all you're doing is to create a number of tables then I'd
get Perl to write the whole SQL statement for you and just
$dbh-do($sql)
Even so, what you've written is weird. You're creating a set of thirty
tables, each with two character columns with a maximum length equal
to the table n
er, sorry.
Is there a module to produce html formatted output? If so, would I be
directed to some documentation?
> > I have to assume that any of the simple HTML-izing I want to do
> > with simple text files has already been done. I'm guessing
> > modules, particularly "CGI" but would appreciate
---
On Thu, 17 Jul 2003 09:20:20 +0800, "LI NGOK LAM" <[EMAIL PROTECTED]> wrote:
> Is there anyway to modify my BIOS clock by Perl ?
> and more, is there anyway to adjust my BIOS clock, so
> to sync. with other time servers ?
>
1) This is a very OS/har
Sharad Gupta wrote at Wed, 16 Jul 2003 21:03:49 -0700:
> Ok, Let me try to put it the other way.
>
> Any good books on how to learn perl on windows??.
What about
"Learning Perl on Win32 Systems"
by Randal L. Schwartz, Tom Christiansen, Erik Olsen
from O'Reilly
Greetings,
Janek
--
To unsubscr
Hi,
I want to create differnent Socket Handles in a function and the function creates the
created Socket Handle..
my $sock = gensym();
I am getting the same instance of Handle "S".
Please some one tell me how to create different instances of sockets in perl.
Regards
Rajeev
--
To unsubscribe
thanks it's solved
-Mensaje original-
De: Sparrow, Dave [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 17 de julio de 2003 15:38
Para: Ruben Montes; '[EMAIL PROTECTED]'
Asunto: RE: Pattern matching
How about this:
$_ = "<45>13: 16:18:46: %SYS-5-CONFIG_I";
print "$1\n" if /(%.*)$/;
or, i
How about this:
$_ = "<45>13: 16:18:46: %SYS-5-CONFIG_I";
print "$1\n" if /(%.*)$/;
or, if you're reading lots of lines like this from a file:
while(<>) {
print "$1\n" if /(%.*)$/;
}
Cheers,
Dave
-Original Message-
From: Ruben Montes [mailto:[EMAIL PROTECTED]
Sent: 17 July 2003 10:2
Ramprasad wrote:
> Hello all,
>
> I have a mysql database and I want to create tables
> w1 w2 w3 w4 ... w30
>
> Can I use the prepare and execute methods of DBI
> I am getting an error because DBI is quoting the table name and
> Mysql is not accepting it
>
> This is my code
>
> #!/usr/bin/perl
> us
Hi,
I think the question at hand may be quite simple, though I could not
figure the asnwer out :-))
MyScript.pl runs an other script (foo.pl) with the system call:
system foo.pl arg1 arg2 ;
I would like to have a status report (error flag) from foo.pl, which
does some exit's and die's at error
>
> In the documentation of socket appears the fllowing:
> $sockaddr = 'S n a4 x8'
>
> What means this???
it is a template for packing the generic C socket adr structure. readup on
sockets for deeper explanation. the adt string is packed into structure of:
a signed short, followed by an intege
Hi again and thx John for you help.
> > Hi all,
>
> Hello,
>
> > I'd like to get a script which allows me to get the gid of the
> > user which is connected currently.
> > I've done this "script" which is not very useful for me because
> > I have to run it like this :
> > id | myscript.pl
>
> You
>
>
> I'm trying to set up credit card processing and one of the
> first steps is to
> establish a "secure socket connection" - how can i do it? (My
> host does
> support it)
>
there are som modules for this:
IO::Socket::SSL
Net::Daemon::SSL
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Hi again and thx John for you help.
> > Hi all,
>
> Hello,
>
> > I'd like to get a script which allows me to get the gid of the
> > user which is connected currently.
> > I've done this "script" which is not very useful for me because
> > I have to run it like this :
> > id | myscript.pl
>
> You
here is a nice tutorial to start with:
http://www.sthomas.net/roberts-perl-tutorial.htm
> -Original Message-
> From: Gupta, Sharad [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 17, 2003 12:04 AM
> To: Gupta, Sharad; [EMAIL PROTECTED]
> Subject: RE: Porting perl scripts on windows
>
>
B. Fongo wrote:
> Hello,
>
> I'm working on my first Perl project. Most of my cgi programs work ok,
> but a look at the apache error log reveals this warning which is
> clear to me:
>
> Variable "$xy" will not stay shared at
> /data/www/cgi-perl/envir.pl line
> 19. [Wed Jul 16 11:44:57 2003] [er
Hello all,
I have a mysql database and I want to create tables
w1 w2 w3 w4 ... w30
Can I use the prepare and execute methods of DBI
I am getting an error because DBI is quoting the table name and Mysql is
not accepting it
This is my code
#!/usr/bin/perl
use DBI;
use strict;
my $dbh = DBI->conne
while(<>){
@arr =split(" ",$_);
$arr[2] =~s/\%//g; ## I am not sure whether % is a meta
## character or not. If it is not a meta character, just remove the "\"
}
I am also a perl beginner.
Thank you & best regards,
ABC
-Original Message-
From: Ruben Montes [mailto:[EMAIL
Hi Paul
"Rob Anderson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> "Paul Archer" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> [snip]
>
> >
> > If anyone can offer general improvements to that approach, that'd be
> > great--but what I'm really interested in
Hello,
I have this string:
<45>13: 16:18:46: %SYS-5-CONFIG_I
and I only want to print all the characters behind %:
%SYS-5-CONFIG_I
How can I make this?
Regards
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
"Paul Archer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
>
> If anyone can offer general improvements to that approach, that'd be
> great--but what I'm really interested in is finding the first element that
> differs, and maybe the last as well. If there were any easy way
trensett wrote:
-- Forwarded message --
Date: Wed, 16 Jul 2003 18:23:35 -0500 (EST)
From: trensett <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: Regular Expression
On Wed, 16 Jul 2003, Janek Schleicher wrote:
Nick Diel wrote at Tue, 15 Jul 2003 11:12:18 -0600:
hi all,
i am tring to tranfer files between two linux systems through
sftop
i have installed the following modules :
1. Download Net::FTP and Install
2. Download Net::SFTP .
1. PreRequisite for Install Net::SFTP is Net::SSH::Perl
2. PreRequisite for Net::SSH::Perl is
2.1
? means minimal matching not maximal, so without the question mark it would match up
to the second closing paren in the following line.
( test data ) ( more test data )
which is not what you want, it would match up to the last closing paren in the data
you gave it, forgetting about newlines,
-- Forwarded message --
Date: Wed, 16 Jul 2003 18:23:35 -0500 (EST)
From: trensett <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: Regular Expression
On Wed, 16 Jul 2003, Janek Schleicher wrote:
> Nick Diel wrote at Tue, 15 Jul 2003 11:12:18 -0600:
>
> > I am having a h
I'm working on a bit of code to update a serial LCD display. The display is
4 lines by 40 characters, and each character can be addressed individually.
First, the pseudocode I have is:
compare each element of the new string and the old string
# each string is 160 characters, and represents what i
79 matches
Mail list logo