Re: PERL MySQL DBI

2001-12-06 Thread Maxim Berlin
Hello Aaron, Friday, December 07, 2001, Aaron Shurts <[EMAIL PROTECTED]> wrote: AS> Okay, I was the one that asked the crazy question about the weird join, AS> but I got that figured out. Now I have a problem. AS> while( ($login, $existingemail, $areacode, $prefix, $rest) = $sth->>fetchrow_arr

Working with Perl Modules

2001-12-06 Thread Sharat Hegde
Hello, I have been using Perl for some time but have not yet used the Perl modules. I wanted to start off with the HTML::Template module - it will save me a lot of effort if I can use it. I need to get this working on Windows (where I do my development) as well as on my 3rd party shared host (

Re: Confirmation...

2001-12-06 Thread Leon
- Original Message - From: "Messier, Jean-Francois" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Daniel Falkenberg" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, December 07, 2001 12:06 AM Subject: RE: Confirmation... > I'm a beginner in those regular expressions and s/// op

RE: PERL MySQL DBI

2001-12-06 Thread Gibbs Tanton - tgibbs
Oracle has an NVL command such that you can say: select NVL( email, "NO EMAIL PROVIDED" ) from table; and if email is NULL then NO EMAIL PROVIDED will be returned. I know that mySQL has a similar mechanism, but I don't know what it is called (it might be NVL). I would try to do that. -O

PERL MySQL DBI

2001-12-06 Thread Aaron Shurts
Okay, I was the one that asked the crazy question about the weird join, but I got that figured out. Now I have a problem. while( ($login, $existingemail, $areacode, $prefix, $rest) = $sth->fetchrow_array ()) { print "$login,$existingemail,$areacode-$prefix-$rest\n"; } That code

next step

2001-12-06 Thread Murzc
This is a question for Perl programmers in the field. I would like to hear your advice in my next step. I work presently in a DOS - windows environment. I program Perl in DOS. It is pretty straight Perl scripts. Besides some DBI, and a sprinkle of CGI, it's mainly straight Perl. I learnt Perl

Re: Restarting a daemon...

2001-12-06 Thread Ahmed Moustafa
Hi Daniel, I had the following code. I hope it would help. # Before your while loop: #--- open (PID, $pidfile) || die "Cannot $pidfile: $!\n"; while ( $pid = ) { system "kill -9 $pid"; } close (PID); open (PID, ">$pidfile") || die "Can

Re: Restarting a daemon...

2001-12-06 Thread Brett W. McCoy
On Fri, 7 Dec 2001, Daniel Falkenberg wrote: > I have a daemon here that runs in a while loop. I was just wondering if > it is possible to restart a perl daemon instead of doing the > following... > > %killall name_of_perl_daemon.pl You may be able to do # kill -HUP `pidof name_of_perl_daemon.

Re: Is A File Encrypted?

2001-12-06 Thread Elaine -HFB- Ashton
Curtis Poe [[EMAIL PROTECTED]] quoth: *> *>If a compression tool leaves large patterns in the data, it's a poor *>compression tool. You can read more about this here: *>http://perl.plover.com/Huffman/huffman.html. Compression reduces entropy which, if used before encryption, can make the decryp

Restarting a daemon...

2001-12-06 Thread Daniel Falkenberg
Hi All, I have a daemon here that runs in a while loop. I was just wondering if it is possible to restart a perl daemon instead of doing the following... %killall name_of_perl_daemon.pl How would I go about doing something like... service name_of_perl_daemon.pl restart Can I do this with per

Re: how to delete trailing space?

2001-12-06 Thread A. Rivera
$var=~ s/\s+$//g; - Original Message - From: "Alex Cheung Tin Ka [CD]" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 06, 2001 5:43 PM Subject: how to delete trailing space? Hi, I am going to receving a textbox area content from CGI. How to cut those unwanted t

how to delete trailing space?

2001-12-06 Thread Alex Cheung Tin Ka [CD]
Hi, I am going to receving a textbox area content from CGI. How to cut those unwanted trailing white spaces? Thanks, Alex

Finding 'probable' duplicate records

2001-12-06 Thread Carl Rogers
Good day; Let me start off by saying that by just reading this list, I've received a lot of great information that I have been able to put to use (Now that I've flattered all you gurus) I have code that finds true (exact) duplicates in records: while () { if (not $seen{$_}) {

RE: perl code question;How to make script strip out lines in read onl y, Leaving search criteria

2001-12-06 Thread Wagner-David
Title: Nature Uncertain what you are really after, but gving it a shot at     Chagned lines of code to if ( /($desc.+)/i ){print "$1\n";} which gave output of: Job Report for job Filesystem (job ID 1007449200):Files backed up:   421Total data backed up:  6736785 KBTotal data on tape: 

Re: Is A File Encrypted?

2001-12-06 Thread Curtis Poe
--- Elaine -HFB- Ashton <[EMAIL PROTECTED]> wrote: > Curtis Poe [[EMAIL PROTECTED]] quoth: > *> > *>This probably is not the most helpful comment, but one way to tell > *>if something is encrypted is to compress the data using Archive::Zip > *>or something similar. I don't know, offhand, what th

Re: Getting next Monday...

2001-12-06 Thread John W. Krahn
Sandeep Shinagare wrote: > > Hi All, > I am trying to find the date, month and year of the next Monday given any > day. > I am using this to get todays date/day/month etc. Is there a way to use > this > information to get the next Monday? > > #snip-start > $thisday=(Sun,Mon,Tue,Wed,Thu,Fri,Sat

Re: Is A File Encrypted?

2001-12-06 Thread Elaine -HFB- Ashton
Ray Murphy [[EMAIL PROTECTED]] quoth: *>Hello, *> *>Want to make sure I'm not missing anything here. My *>task is to see if a file looks like it's encrypted. *>I'm splitting the path/filename/extension via *>File::Basename and checking to see if the extension is *>..pgp or .gpg. I'm also checki

Re: Is A File Encrypted?

2001-12-06 Thread Elaine -HFB- Ashton
Curtis Poe [[EMAIL PROTECTED]] quoth: *> *>This probably is not the most helpful comment, but one way to tell *>if something is encrypted is to compress the data using Archive::Zip *>or something similar. I don't know, offhand, what the threshhold is, *>but if a file significantly compresses the

Re: Perl + Procmail

2001-12-06 Thread Peter Scott
At 12:23 PM 12/6/01 -0800, Agustin Rivera wrote: >Anyone use Procmail to pipe information to a Perl script for processing? If >so, any basic example of the procmail recipe and a Perl script would be >greatly appreciated. I second the Mail::SpamAssassin recommendation. When Mail::Audit came out

perl code question;How to make script strip out lines in read only, Leaving search criteria

2001-12-06 Thread Binkley Robert - rbinkl
Title: Nature Subject:[How to make script strip out lines in read only, Leaving search criteria   #!/usr/bin/perl$filename=$ARGV[0];   # File name to be read must be created todayopen(FILENAME,"<$filename");@search=("Task Completed", "Job report", "Volsers used", "T

Re: printing all variables

2001-12-06 Thread Lanceo
Perhaps proprietary is too strong a word. Intershop uses a slimmed-down version of perl, and the scripts that you write to run there use variables that can only be accessed for a live session(usually): if the script that you write uses any of the API packages from Intershop and you try to run it

Re: printing all variables

2001-12-06 Thread Jenda Krynicky
> Is there a way to insert a statement into a perl script that will show > the values of all of your variables? Other than using a massive > collection of print statements. Well maybe there's a module for that. As a hack you may use : use Data::Dumper; foreach (keys %main:: )

Re: printing all variables

2001-12-06 Thread Brett W. McCoy
> On Thu, 6 Dec 2001, Lanceo wrote: > > > Is there a way to insert a statement into a perl script that will show the > > values of all of your variables? Other than using a massive collection of > > print statements. ie In a Unix shell script if you, at any time use > > 'set -x' all of the varia

Re: printing all variables

2001-12-06 Thread Brett W. McCoy
On Thu, 6 Dec 2001, Lanceo wrote: > Is there a way to insert a statement into a perl script that will show the > values of all of your variables? Other than using a massive collection of > print statements. ie In a Unix shell script if you, at any time use > 'set -x' all of the variables are pr

printing all variables

2001-12-06 Thread Lanceo
Is there a way to insert a statement into a perl script that will show the values of all of your variables? Other than using a massive collection of print statements. ie In a Unix shell script if you, at any time use 'set -x' all of the variables are printed to the screen. Is there maybe a big

Re: Perl + Procmail

2001-12-06 Thread Daniel Gardner
Thursday, December 06, 2001, 8:23:27 PM, Agustin Rivera wrote: AR> Anyone use Procmail to pipe information to a Perl script for processing? If AR> so, any basic example of the procmail recipe and a Perl script would be AR> greatly appreciated. something like :0 *^TOwhoever | /my/script/he

Perl + Procmail

2001-12-06 Thread Agustin Rivera
Anyone use Procmail to pipe information to a Perl script for processing? If so, any basic example of the procmail recipe and a Perl script would be greatly appreciated. More info: I'm needing to process bounced email so that the person who sent it will understand why the email has come back to t

Automating bookmarks in pdf

2001-12-06 Thread William.Ampeh
Has anyone tried automation the process of defining bookmarks in pdf files? Currently the only way that I know of is by using Acrobat's "acroexchange" GUI tool . What I wish to do is to enter something like: acroexchange -bookmark "Foreign Debt Tables" -page 3 abc.pdf > abc_new.pdf ___

Re: FW: Long variable again

2001-12-06 Thread iain truskett
* Carl Rogers ([EMAIL PROTECTED]) [07 Dec 2001 06:34]: [...] > How about this: > $linebreak = "-" x 70; > $string = "\nHELLO WORLD!\n\n". >"To $to, \n\n". >"\n". $linebreak. "\n Hello World ". >"Thank you for using our software.\n\n"; > Not pretty, not elega

Re: FW: Long variable again

2001-12-06 Thread Carl Rogers
At 02:09 PM 12/6/2001 +1030, Daniel Falkenberg wrote: > > Hey again all! > > > > $string = "attack. The password for $user_to_change should not have > > to be changed.\n". > > "-" x 70, "\n Hello". > > "Thank you for using our software.\n\n"; > > > > Now I have been informed t

Re: Is A File Encrypted?

2001-12-06 Thread Karthik Krishnamurthy
The -T won't work of the data can be uuencoded. /kk On Thu, Dec 06, 2001 at 09:06:19AM -0800, Ray Murphy wrote: > Hello, > > Want to make sure I'm not missing anything here. My > task is to see if a file looks like it's encrypted. > I'm splitting the path/filename/extension via > File::Basenam

concatenation pdf files

2001-12-06 Thread William.Ampeh
Hello, Is there a script based routine for concatenation postscript or pdf files? So I want to do something like cat abc[1-3].pdf > big_abc.pdf PS: Currently, I do: cat abc[1-3].ps > big_abc.ps distill big_abc.ps I was wondering if there is anything out there that can help automat this. _

Re: how to check for installation of modules

2001-12-06 Thread Lanceo
It worked perfectly. Just what I needed. Thanks! "Brett W. McCoy" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Thu, 6 Dec 2001, Lanceo wrote: > > > What is the syntax to use perl to check to see if a certain module exists? > > For example I would like t

Re: Is A File Encrypted?

2001-12-06 Thread Curtis Poe
--- Ray Murphy <[EMAIL PROTECTED]> wrote: > Hello, > > Want to make sure I'm not missing anything here. My > task is to see if a file looks like it's encrypted. > I'm splitting the path/filename/extension via > File::Basename and checking to see if the extension is > ..pgp or .gpg. I'm also ch

Re: Getting next Monday...

2001-12-06 Thread Peter Scott
At 05:06 PM 12/6/01 +, Shinagare, Sandeep wrote: >Hi All, >I am trying to find the date, month and year of the next Monday given any >day. >I am using this to get todays date/day/month etc. Is there a way to use >this >information to get the next Monday? > >#snip-start > $thisday=(Sun,Mon,Tu

Re: how to check for installation of modules

2001-12-06 Thread Brett W. McCoy
On Thu, 6 Dec 2001, Lanceo wrote: > What is the syntax to use perl to check to see if a certain module exists? > For example I would like to check (on the command line) if the LWP module is > properly installed. I am hoping for something like: perl {a couple of > switches here} LWP > and a messa

Re: Is A File Encrypted?

2001-12-06 Thread GoodleafJ
I assume you mean just files on a drive, rather than files in an email... (which could be s/mime or openpgp or just flat out encrypted). I can't really think of any better tests--although I think you'd have to be careful looking for patterns in the text. Could someone with a different character se

RE: Getting next Monday...

2001-12-06 Thread Wagner-David
By using day of the week out of locatime, you should be able to determine how many days you need to add to get to Monday. Example: Thu is 4 and Mon is 1. So if always looking for the next Monday, then you can do something like: my ($sec,$min,$hour,$mday,$mon,$year,$wday) = l

Weekly list FAQ posting

2001-12-06 Thread casey
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)

Re: Is A File Encrypted?

2001-12-06 Thread Ahmed Moustafa
If you expect a certian pattern of text in the file, I think, you can grep the file from the expected text pattern. If you find any, then the file is not encrypted; otherwise, the probability of the file being encrypted would be higher. --Ahmed [EMAIL PROTECTED] | http://arbornet.org/~ahmed On T

how to check for installation of modules

2001-12-06 Thread Lanceo
Hi, What is the syntax to use perl to check to see if a certain module exists? For example I would like to check (on the command line) if the LWP module is properly installed. I am hoping for something like: perl {a couple of switches here} LWP and a message returned that tells me that it is or i

Getting next Monday...

2001-12-06 Thread Shinagare, Sandeep
Hi All, I am trying to find the date, month and year of the next Monday given any day. I am using this to get todays date/day/month etc. Is there a way to use this information to get the next Monday? #snip-start $thisday=(Sun,Mon,Tue,Wed,Thu,Fri,Sat)[(localtime)[6]]; $thisdate=(localtime)[3];

Is A File Encrypted?

2001-12-06 Thread Ray Murphy
Hello, Want to make sure I'm not missing anything here. My task is to see if a file looks like it's encrypted. I'm splitting the path/filename/extension via File::Basename and checking to see if the extension is ..pgp or .gpg. I'm also checking to see if the file is a text file via 'if (-T $fi

Re: Confirmation...

2001-12-06 Thread _brian_d_foy
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jean-Francois Messier) wrote: > I'm a beginner in those regular expressions and s/// operations. How > can I extract only the digits and the periods (.) from a string ? I have > something like 206.48.16.3/12345. An IP address with a port

RE: Confirmation...

2001-12-06 Thread Ahmed Moustafa
Hi Messier, Try that: #[1] $str="206.48.16.3/12345"; $str=~ s/\/.*//g; #[2] $str="src=206.48.16.3/12345"; $str=~ s/^src=|\/.*//g; I hope that helps. --Ahmed [EMAIL PROTECTED] | http://arbornet.org/~ahmed On Thu, 6 Dec 2001, Messier, Jean-Francois wrote: > I'm a beginner in those regu

Re: perl script to remove control M's

2001-12-06 Thread _brian_d_foy
In article , [EMAIL PROTECTED] (Brent Michalski) wrote: > I always like to simply use: > > perl -pi -e 's/\r//' you have to be careful with that though because it's not portable. \r means different things to different OSes :) perl -pi -e 's/\

Re: mysql....postgres

2001-12-06 Thread _brian_d_foy
In article <000801c17e49$4a172df0$[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Nafiseh Saberi) wrote: > why do you use always "mysql" and > not "postgres" ?? who said nobody uses postgresql? -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.ht

Breakout of Ip Address ( was RE: Confirmation...)

2001-12-06 Thread Wagner-David
using a regex like : /^src=((\d+\.){3}\d+)\// Starts at beginning of variable with src= then place in $1 3 sets of digitrs followed by a period and another set of digits followed by a / Now you could have the port check as part of the regex, but that would be up

RE: detecting a hash of hashes

2001-12-06 Thread Sidharth Malhotra
Try the ref() function. if (ref($hash{$data}) eq 'HASH') {} Hth. Sid. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Pete Emerson Sent: Thursday, December 06, 2001 9:03 AM To: [EMAIL PROTECTED] Subject: detecting a hash of hashes Here is an exampl

RE:how to patch a file

2001-12-06 Thread Jeff 'japhy' Pinyan
On Dec 6, Jorge Goncalvez said: >Hi, I wanted to patch a file and I have this: > >system(perl -i.rig -pe 's!/home/ftp!/!g' c:\cygwin\etc\passwd) > >it fails when I put in a script but it succeed if i run it by hand in a bash. Because you haven't quoted the system() string. system(q{perl -i.r

RE: Confirmation...

2001-12-06 Thread Messier, Jean-Francois
I'm a beginner in those regular expressions and s/// operations. How can I extract only the digits and the periods (.) from a string ? I have something like 206.48.16.3/12345. An IP address with a port number. There are digits on both sides of the slash, but I would like to keep only the d

RE:how to patch a file

2001-12-06 Thread Jorge Goncalvez
Hi, I wanted to patch a file and I have this: system(perl -i.rig -pe 's!/home/ftp!/!g' c:\cygwin\etc\passwd) it fails when I put in a script but it succeed if i run it by hand in a bash. Why? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTEC

Next 10 Results Help Needed

2001-12-06 Thread Darryl Schnell
I am working on a program that will read the password file and display a list of users that match the gid's 670 & 671 on an html page. I have that part worked out, however now I want to have the results display in groups of ten allowing the user to click on next results to see the next results.

WWWBoard

2001-12-06 Thread Joyce Harris
Hey, I was just wondering if anyone has used WWWBoard (the admin version) and what you think about it. Joyce

RE:delete the last 3 lines of a file

2001-12-06 Thread Jorge Goncalvez
Hi, I have a file which I write to it like this it ends by: host clin09 {hardware ethernet 00:80:9F:2E:3F:5E; filename "/bootp/linux/pre3.1/alize/startup.txt";} } What I wanted to do is to delete this 3 end lines before to write to it, How can I do This in Perl? -- To unsubscribe, e-

Re: thanks for the info on removing control m's

2001-12-06 Thread Brett W. McCoy
On Thu, 6 Dec 2001, Booher Timothy B 1stLt AFRL/MNAC wrote: > For example I have 'ABCDEFGH' and I want to get the right three letters: > > Right('abcdefgh',3) = 'fgh' > > Left can be done with substring (x,0) I am sure, but what about right? You can still use substr, just give it a starting poin

Re: thanks for the info on removing control m's

2001-12-06 Thread Chris Ball
On Thu, Dec 06, 2001 at 08:21:30AM -0600, Booher Timothy B 1stLt AFRL/MNAC wrote: > For example I have 'ABCDEFGH' and I want to get the right three letters: > Right('abcdefgh',3) = 'fgh' Use a negative value for the range argument, as described in perldoc -f substr: void:chris~ % echo "abcdefgh"

Re: thanks for the info on removing control m's

2001-12-06 Thread Frank
On Thu, Dec 06, 2001 at 08:21:30AM -0600, Booher wrote: > I am wondering how you would use the VB equivalents of Left$ and Right$ with > perl. TIMTOWTDI: index, rindex are functions that do the same. more graceful? are regexes using anchors ^ for the start or $ fro the end. ie. /^\w{3}/ or /\w

RE: thanks for the info on removing control m's

2001-12-06 Thread Chris Spurgeon
perldoc -f substr Just use a negative number for the offset, and it grabs characters from the right. Chris Spurgeon Senior Design Technologist [EMAIL PROTECTED] ELECTRONIC INK One South Broad Street 19th Floor Philadelphia, PA 19107 www.electronicink.com t 215.922.3800 x(

thanks for the info on removing control m's

2001-12-06 Thread Booher Timothy B 1stLt AFRL/MNAC
Thanks a lot - I have set up an alias to make my life easier. I am wondering how you would use the VB equivalents of Left$ and Right$ with perl. For example I have 'ABCDEFGH' and I want to get the right three letters: Right('abcdefgh',3) = 'fgh' Left can be done with substring (x,0) I am sure,

Re: detecting a hash of hashes

2001-12-06 Thread Jonathan E. Paton
Hi, Use the "ref" function, it returns the type (or false if not a reference). Assuming it's either a scalar or another hash do this: foreach my $data (keys %hash) { if (not ref($hash{$data})) { print "\$hash{$data} --> $hash{$data}\n"; } else { foreach my $second (keys %{$hash{$dat

Re: perl script to remove control M's

2001-12-06 Thread Brent Michalski
I always like to simply use: perl -pi -e 's/\r//' I have this line posted im my work-area, along with the Java solution... The Java solution is > 40 lines and imports several libraries... Brent

detecting a hash of hashes

2001-12-06 Thread Pete Emerson
Here is an example of what I'm doing to detect whether I've got a scalar value in my hash or a hash of hashes: #!/usr/bin/perl -w use strict; my %hash; $hash{name}='Pete'; $hash{color}{favorite}='Blue'; $hash{color}{car}='Silver'; $hash{color}{house}='White'; foreach my $data (keys %hash) { i

Re: today's date....

2001-12-06 Thread Etienne Marcotte
You see, if your script is french you need an array of daynames and monthnames in french. If you want -mm-dd to insert into a database, you need to format If you don't want to have the year after the time, you need to edit. If you want the th, nd, st after the date also If you want the 05

Re: mysql....postgres

2001-12-06 Thread Brett W. McCoy
On Thu, 6 Dec 2001, nafiseh saberi wrote: > why do you use always "mysql" and > not "postgres" ?? I use PostgreSQL myself, have since like 1997 or so. -- Brett http://www.chapelperilous.net/ --

Re: mysql....postgres

2001-12-06 Thread Djoko Priyono
nafiseh saberi menulis pd tgl 06 December 2001 Thursday 06:29 pm sbb: :: hi dear team... :: :: why do you use always "mysql" and :: not "postgres" ?? Not always use mysql, I use Postgres for my database. Regards, Djoko Priyono www.dnet.net.id :: :: thx for your time. :: _

mysql....postgres

2001-12-06 Thread nafiseh saberi
hi dear team... why do you use always "mysql" and not "postgres" ?? thx for your time. Best regards. Nafiseh Saberi www.iraninfocenter.net www.sorna.net Beaty is in the eye of the beholder. _

Re: diffs of mirror files in 2 directories

2001-12-06 Thread Sudarsan Raghavan
Take a look at File::Compare (perldoc File::Compare). hth, Sudarsan Roy Peters wrote: > I have 2 directories: > > x/y/z and a/b/c > > within both directories, I have the same files say a1.c thro a10.c > > I would like to write a perl script to go through all the files in each > directory and

Re: HowTo prevent CPAN upgrading perl.

2001-12-06 Thread Scott R. Godin
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Gary Stainburn) wrote: > Hi all, I'm trying to install RT2 - perl helpdesk suite, but it depends on a > load of modules which it will automaticall install using CPAN (I believe) as > part of the install script. Is it possible to tell CPAN *no