Re[2]: flush - ?

2001-05-17 Thread k
> > Question: What is "flush"? and how can a filehandle be flushed? I saw > > such a phrase while looking for info about file locking. > > If you would rather have every byte sent down that pipeline without > buffering, you can set a filehandle as unbuffered with the following: > > my prev = s

Print post_https

2001-06-21 Thread K Old
Hello, I'm using OpenSSL with Net::SSLeay and have a need to print the actual string that is being generated by the post_https() function. I have tried the following : print post_https($host, $port, $script, '', %form_data); I get 10 from doing this. I'd like to get the actual string that is b

SSL script troubles

2001-06-22 Thread K Old
Hello, I cannot get the following script using Net::SSLeay and OpenSSL to work correctly. I would really like to print what post_https is sending to the screen before it is sent to the SSL server. Any ideas? #!/usr/local/bin/perl # # CHANGE THE ABOVE TO POINT TO PERL 5.004 ON YOUR SE

Re: Getting Started

2001-06-24 Thread K Hendricks
you should visit Original Message Follows From: "Ron Smith" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Getting Started Date: Sat, 23 Jun 2001 20:21:19 -0700 MIME-Version: 1.0 X-Originating-IP: [24.130.49.190] Received: from [209.85.157

Re: diff bet list and an array

2001-07-09 Thread K Hendricks
An array is a list object in which all elements are indexed. A list is the context to which arrays belong. An list does not have to be referenced through an array and may be used as part of many functions. @array = (item1, item2, item3); # a list of items are assigned to an array. print $item1

System command via CGI not working....but should

2001-08-15 Thread K Old
Hello, I am trying to get a CGI script to run a system command.for example system `/usr/sbin/adduser larry' or die "User was not added" $?; I have this line in a script and have set Apache to be run as root (don't worry, all this is being done on a test box...I know the security risks) and

Problems with Net::SSLeay

2001-05-29 Thread K Old
Hello, I'm trying to use the Net::SSLeay module and am calling it like: use Net::SSLeay qw(post_https make_headers make_form); but I'm getting the following response at the command line. Can't load '/usr/local/lib/perl5/site_perl/5.6.0/i686-linux/auto/Net/SSLeay/SSLeay.so' for module Net

Apache::ASP help

2001-05-31 Thread K Old
Hello everyone, I know that Apache::ASP might be a little off topic, but I don't really know anyplace else to ask this question that I'm sure I'll get a valid response. I'm using Apache::ASP and it works fine. What I'd like to do is use it and have some ASP code write to a Microsoft Access da

Re: background process

2001-12-26 Thread K Old
Try either the system function (which will allow you to return to your program after your call to dtterm is finished) or the fork function. Hope this helps, Kevin On Wednesday 26 December 2001 10:56 pm, Ashish Srivastava wrote: > hi everybody, > > how can i run any command in background > like

Packages in CGI

2002-01-03 Thread K Old
Hello all, I have a few questions about using packages in CGI.  First, here is my situation.  I am creating a account management and billing set of scripts and want to modularize it.  I have most (if not all of the code) scattered among several .pl files and not necessarily in subroutines, b

Re: delete one column in table

2002-01-05 Thread Dave K
For most rdbms you would use ALTER TABLE, for postgresql you can't. Lets say you originally created CREATE TABLE example ( col1 varchar, col2 varchar, colthree numeric); then realized colthree was in the wrong table. you can: CREATE TABLE temp AS SELECT col1,col2 FROM example; DROP TABLE EXAMPLE;

Re: call a windows application (.exe) via perl

2002-01-05 Thread K Old
I would assume you could just use either a system() or exec() call. Check the documentation on perldoc.com. One of them will wait until whatever program is running finishes and the return you to your perl program. Hope this helps, Kevin On Saturday 05 January 2002 04:42 am, mb wrote: > Hi,

Re: If...Statement

2002-01-08 Thread Dave K
The question is a bit fuzzy, but try this at the command line, just for fun: perl -e 'my $line = "abrabracadabra";print $line++, " ", $line, "\n";' then consider this: #!D:/cygwin/bin/perl my ($i, $line, $nextline); open (TEXTF, "c:/temp/somelines.txt") or die "Evil forces keep me for doing what

Is it possible to query DNS for an SRV record in perl?

2002-01-14 Thread K Reddy
Hi, everyone. My boss has assigned me the job of putting together a web page with employees' contact information pulled from the Microsoft Exchange server. I was able to write a script using Net::LDAP with Exchange 5.5, but the company is now in the process of migrating to Exchange 2000. The admi

Re: absolute beginner has questions

2002-02-03 Thread Dave K
Thomas, Any editor (I use notepad, WinVim, and anything else available - later you may find reason to look for a 'better' editor and there is always plenty of opinion available about editors). With windows, you can set a file extension association by clicking in My Computer, View, Options.

Perl Beginners

2010-03-11 Thread Sudheer K
Hi ALL I am planning to start programming perl for my project . i am just a beginner to perl can i get information related to videos/links and books especially for beginners which can help me writing scripts . Thanks

Help with Compress::Zlib under cygwin

2009-02-22 Thread Robyn K
I was installing PDF::Create with cpan under cygwin and it "suggested" that I upgrade cpan by also installing Bundle::CPAN. I tried that and now I have a mess. Whenever I try to install a new module now, I get this error: CPAN: Compress::Zlib loaded ok Can't call method "value" on an undefined v

IDE for web pages produces by Perl/MySql

2004-10-10 Thread Mike K
G'day... I'm wanting to use Perl with MySQL to produce web pages, and then process the results. Are there any IDEs (like PageMill, Dreamweaver, etc) that understand Perl or can write templates that Perl can understand using a particular package? All help appreciated. Thanks Mike (Please reply-

Re: Append on top (easy sollution)

2004-11-14 Thread K-sPecial
) to move to the beginning of the file. Done :) --K-sPecial [ http://xzziroz.freeshell.org irc://xzziroz.dtdns.net ] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Unlink ? [edited]

2004-11-14 Thread K-sPecial
ber to add prints to aid in debugging when needed (maybe cmdResult IS being defined). My suggestion is to either use unlink() or change 'if ($cmdResult =~ /^\s*$/) {' to 'if (!($cmdResult)) {' and try again. Using the * quantifier has been known to cause problems. --K-sPec

Re: Need help with creating a web forwarding site.

2004-11-14 Thread K-sPecial
ust looking for advice, pointers, suggestions, caveats, watch-out-fors and general information. Should be a fun exercise! Thanks, ZO You could simply put up an http 'error page moved' type thing, most all browsers will recognize this and load the new page. --K-sPecial [ http://xz

Re: Searching tecknical documentation

2004-11-15 Thread K-sPecial
A B.R. Stephen Liu perldoc.com is always a handy place to have as your quick check to lots of perl questions and answers. --K-sPecial [ http://xzziroz.freeshell.org irc://xzziroz.dtdns.net ] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Searching tecknical documentation

2004-11-15 Thread K-sPecial
ttp://learn.perl.org/first-response> Damn (if I may say so), nice link. --K-sPecial [ http://xzziroz.freeshell.org irc://xzziroz.dtdns.net ] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Searching tecknical documentation

2004-11-15 Thread K-sPecial
g from the authors of these books. Yea he's got a point... --K-sPecial -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Changing registry ACL?

2004-11-15 Thread K-sPecial
t;ACL" changes. But for all my registry needs i've used Tie::Registry from CPAN and have always had the success i've been looking for. --K-sPecial [ http://xzziroz.freeshell.org irc://xzziroz.dtdns.net ] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: Searching tecknical documentation

2004-11-16 Thread K-sPecial
Randal L. Schwartz wrote: "K-sPecial" == K-sPecial <[EMAIL PROTECTED]> writes: K-sPecial> Damn (if I may say so), nice link. Die, pirate scum. You insult me personally by pirating my words. How do you expect me to have the means to write future books? I simply said it was a

Re: Append on top (easy sollution)

2004-11-16 Thread K-sPecial
K-sPecial wrote: Rajesh Dorairajan wrote: Does anyone know of a way to open a file in append mode and append on top of the file? Thanks in Advance, --Rajesh I don't know why people are having a problem with this sollution, simply open in append mode so open doesn't clobber the file

Re: Searching tecknical documentation

2004-11-16 Thread K-sPecial
Where I live that's cheaper than Internet access. EB I was implying that they could be viewed from the actual library. $20 a month can actualy be alot of money. --K-sPecial -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.

Re: Searching tecknical documentation

2004-11-16 Thread K-sPecial
Randal L. Schwartz wrote: "K-sPecial" == K-sPecial <[EMAIL PROTECTED]> writes: K-sPecial> But on another note, I don't believe many of the people K-sPecial> that claim this as 'stealing' are personaly looking in the K-sPecial> perspective of someone living

Re: Searching tecknical documentation (correction)

2004-11-16 Thread K-sPecial
Correction, I do admit, obviously. I hate for having to ever do such a thing. It's the sort of things i'm forced to live with daily. --K-sPecial -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://l

Re: Autmatic function creation

2004-11-16 Thread K-sPecial
shift; $InheritableClassData{$_} = shift if @_; return $InheritableClassData{$_}; } } ---END--- Looks realy good here, I might use a closure through a typeglob to assign the subroutine though. --K-sPecial -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional command

Re: how to capture host name to a variable

2004-11-20 Thread K-sPecial
e intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. system doesn't capture output, use backticks (``) for that: $systemserver = `hostname`; --K-sPecial [ http://xzziroz.freeshell.org irc://xz

Need Help

2006-09-03 Thread Nagakishor, K
I have a file containing 100's of structures in it. In that file I need to identify the structures with particular name (ex: N1 AND N2) and dump the values of only some fields (ex: P1 AND P2) in to another file. If a structure does not contain the names N1 AND N2, then we should skip it. May

Perl Formula Help - Changing a Price in script

2012-03-20 Thread Dave K
Hello - I am new to Perl, and looking for some much needed direction. I am trying to get a basic formula in place (within an existing IF statement) that will serve to increase my price (i.e., "$new_price") by the following formula: =PRICE divided by 0.8 plus 15 In other words, if the Price is e

split

2012-04-04 Thread Anamika K
Hello All, I have a file like this: NM_009648,NM_001042541:10.955794504181601 NM_019584:1 0.900900900900901 NM_198862:1 0.835755813953488 NM_001039093,NM_001039092,NM_153080:1 0.805008944543828 and want output like this: NM_009648 0.955794504181601 NM_001042541:1 0.955794504

Re: Is there anyway to modify @INC directory list once and for all ?

2002-02-12 Thread Dave K
I use cygwin (with and without perl) and ActiveState perl in a variety of situations. To modify @INC so that Apache uses the right one in the right situation I was using a begin block to modify @INC where needed. Then I thought a module might be more to the point: #!E:/Perl/bin/perl -w # my path

Re: cygwin/activestate/linux

2002-03-03 Thread Dave K
I have found ActiveState to be the 'easiest' in most cases but when I want to do something fun or interesting I often find the module that I need is not available for the ActiveState distribution. Cygwin is fun, but CPAN is sometimes frustrating though it is sometime the only place to get a requir

Re: uploading files

2002-03-11 Thread Mariusz K
Thank you very much for your response. Could you recommend any solution? I know the path where the file is sitting and I want to create a script that would automatically upload it. (I don't want the user to be bothered with entering the path each time.) Thank you, ps. You said: "you want to

how to randomly choose mp3 from dir, print mp3_filename for emailing to a list

2002-03-22 Thread K Clark
linux environment. have o'reilly cookbook & learning perl (2nd ed.). desire to randomly choose a filename of mp3 files in a directory containing only mp3's. then, write the name of this filename to a file that has "http://myurl.org/mywebpath/..."; inserted before the filename so that i end up w

RE: how to randomly choose mp3 from dir, print mp3_filename for e mailing to a list]

2002-03-22 Thread K Clark
Here's what i have, and here's the problem. and here's what i 'think' i have to learn/do to fix it: #/usr/bin/perl -w use strict; # # script to randomly choose a song # and embed html with a link to it # my @mp3 = glob("/www/mp3/*.mp3"); # # put while statement my $mp3 =~ s#.*/##; srand; print "

write variable's contents to file :WAS: how to randomly choose mp3 from dir, print mp3_filename for e mailing to a list

2002-03-22 Thread K Clark
my random mp3 script works with strict and warnings (yeah!). now, i want to do a second task with it, which is additionally write the data of $inc to a file, named mp3.inc. Here's what i have. i can't find the reference to doing this. even the correct perldoc pointer would be wonderful. #/usr/bi

Re: joining 2 strings

2002-03-22 Thread K Clark
would someone tell me whether or not the problem with what the original post is because of $stringa.",".$stringb being unbroken? does that matter? as a fledgling, i always pump alot of space in my scripts, but see some of the more advanced replies here being different... ken On Fri, Mar 22, 20

Re: Creating table for message board server tosave/delete/update messages

2002-03-27 Thread Dave K
Bruce: use warnings; use strict; use DBI; my $dbname = 'Bruce'; my $dbhostname = 'localhost'; my $user = 'root'; my $password = '' ; my $cs = "CREATE TABLE employee_Info (primary_key INT AUTO_INCREMENT NOT NULL, name CHAR(20), surname CHAR(20), employee_no CHAR(10), shoe_colour CHAR (

Re: Read file symbol by symbol?

2002-04-16 Thread Dave K
Here is one script I used to inspect files use strict; my $fn; print"Enter the name of a file you want to examine "; while (<>) { $fn = $_; last if $fn; } print "Opening $fn\n"; open TF, "$fn" or die "Cannot open $fn:$!\n"; my @ov; my $ov; while () { @ov = unpack('U*',$_); print; print"\t\t"

Re: Need help getting started using hashes

2002-04-16 Thread Dave K
First let's let the other list member in on the code: use DBI; use strict; my $dbname = "test"; my $host = "localhost"; my $dbuser = ''; my $dbpw = ''; my $mscs = "dbi:mysql:dbname=$dbname;host=$host;"; my $dbh = DBI->connect($mscs, $dbuser, $dbpw) or die "Connect fails to $dbname\nError = ", $DB

Re: Need help getting started using hashes

2002-04-16 Thread Dave K
David Gray, Thanks for the input. Below is another realization using a pseudohash. Some of the code (print stmts at the end) is there to demonstrate concepts (the way your post did). my $sql = "select methodid, method, sname from method order by methodid"; my $sth = $dbh->prepare($sql) or die

Re: Please Help

2002-04-30 Thread Dave K
I am using Windows. $file = 'D:\\test.txt'; should help out as will the good advice about checking to see if the open succeeds "Josef E. Galea" <[EMAIL PROTECTED]> wrote in message 002201c1f07d$15712780$b9669ec3@josvio">news:002201c1f07d$15712780$b9669ec3@josvio... Hi I am a student an I'm new

Re: Parameters

2002-05-02 Thread Dave K
Just curious, Josef - are you using Windows and have you adjusted the file type binding for open? If you are using windows and have not adjusted the binding do so as follows: goto My Computer, View, Options, File Types. Then find the perl .pl extension and edit the file type, edit the open action,

Re: foreach, my, and arrays

2002-05-06 Thread Dave K
Jason, Play with the script below: my @a1 = qw( one ace ); my @a2 = qw( two deuce ); my @a3 = qw( thr tri ); my @a4 = qw( fou quad ); my @a5 = qw( fiv quat ); my @myarray = (\@a1, \@a2, \@a3, \@a4, \@a5); foreach my $item (@myarray) { my($item1, $item2) = @$item; print "$item1 and $item2

Re: Matching a range

2002-05-10 Thread Dave K
Dave, One possiblity: use strict; open(IN, "lfile.txt"); # ho;d the line from the example in the orig post my $p1 = join('|', (512..520)); my $p2 = join('|', (528..568)); my $p3 = join('|', (576..578)); my $p4 = join('|', (592..600)); my $p5 = join('|', (608..622)); my $p6 = join('|', (624..6

Re: Matching a range

2002-05-10 Thread Dave K
7;Japhy' Pinyan" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On May 10, Dave K said: > > >my $p1 = join('|', (512..520)); > >my $p2 = join('|', (528..568)); > >my $p3 = join('|', (576..

Very Basic Question: Open Interact Installation

2002-05-10 Thread Brian K
don't have yet. Is there any hope? :-) Thanks (I have ActivePerl installed on a win2000pro machine) -- Brian K -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Very Basic Question: Open Interact Installation

2002-05-10 Thread Brian K
? From what I can tell I need SPOPS modules installed before I can proceed with the OpenInteract installation. Thanks -- Brian K -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: HTML tables?

2002-05-22 Thread Dave K
Barry, Check out http://stein.cshl.org/WWW/software/CGI/cgi_docs.html because the author of the CGI module shows a few neat tricks I have not seen elsewhere, For instance, if you needed to iterate over an 'array of arrays' to display the results of a database query and you want to display the

Re: what does a diff return?

2002-05-29 Thread Dave K
Jose, try: $ perl -e ' my $delta; $delta = `diff ae.txt ae.txt`; print $delta."\n"; unless ($delta) { print"they are identical\n"; }' HTH "Jose Torres" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > If I'm calling the diff program from within a Perl

Re: FTP files from one remote server to another

2012-04-20 Thread Matthew K
How secure is this transfer? Is this server to server within the network, or across the Internet? If it remains local, Net::FTP is probably the route you want to go. Just do an $ftp->ls() and do a $ftp->get() on files that match a regex pattern.  If it is not, then you might want to either PGP

Re: PERL CGI, HTML and PHP

2012-04-25 Thread Matthew K
Mark, - Original Message - > From: Mark Haney > To: Perl Beginners  > Cc:  > Sent: Wednesday, April 25, 2012 11:51 AM > Subject: PERL CGI, HTML and PHP >  > I've got, what I hope is a fairly simple problem that someone can point me  > to the best (or best practices anyway) way to handle i

Re: PERL CGI, HTML and PHP

2012-04-26 Thread Matthew K
 Mark, It seems like you have a hammer, and you really want this to be a nail. It just isn't. It's more like a paper clip. Perl and PHP are both server side scripting languages, which means they run on the server. If you use them, you should pick one because they serve the same purpose. You d

Re: Scraping non-html webpage in Perl

2012-05-09 Thread Matthew K
#!/usr/bin/perl use LWP::Simple; my $url = 'your website' my $content = get("$url"); print $content;   -- Matt > > From: Formatting Solutions >To: beginners@perl.org >Sent: Wednesday, May 9, 2012 8:11 AM >Subject: Scraping non-html webpage in Perl > >Hi, > >I wo

RE: What does $$ mean ?

2013-05-17 Thread Frank K.
Gosh, I always thought "$$" is what you have to pay when you get a divorce .. flk k -Original Message- From: Dr.Ruud [mailto:rvtol+use...@isolution.nl] Sent: Friday, May 17, 2013 7:47 AM To: beginners@perl.org Subject: Re: What does $$ mean ? On 17/05/2013 14:39, *Shaji

Re: string match question

2013-08-20 Thread Matthew K
There are a few ways to do it. It's hard without knowing the data. You could do: $text =~ /Critical Alarm Present([^\.]+)./ ? print "$1\n" : print 0; ;  # if they all end with a period $text =~ /Critical Alarm Present(.*)Recent Device Events./s ? print "$1\n" : print 0;  # if Recent Device Event

Re: string match question

2013-08-21 Thread Matthew K
Can you use LWP::Simple? use LWP::Simple; my $content = get("http://www.google.com/";);   -- Matthew Kunzman Software Engineer  Boise, ID USA Email: matt_...@rocketmail.com  Website: http://www.mattkunzman.com LinkedIn: http://www.linkedin.com/pub/matthew-kunzman/b/5ba/94a -

reading a hash of arrays

2014-11-19 Thread Frank K.
Have a hash of arrays.. i.e. $hash{one}[0] = "value 10"; $hash{one}[1] = "value 11"; $hash{one}[2] = "value 11"; $hash{one}[3] = "value 13"; $hash{one}[0] = "value 20"; $hash{one}[1] = "value 21"; $hash{one}[2] = "value 22"; $hash{one}[3] = "value 23"; If I had two arrays and wanted

RE: reading a hash of arrays

2014-11-19 Thread Frank K.
Thanks for the hint.. And I was looking forward to a night of heavy drinking.. Oh well, might as well code into the night.. Thanks again.. flk k -Original Message- From: Shawn H Corey [mailto:shawnhco...@gmail.com] Sent: Wednesday, November 19, 2014 5:09 PM To: beginners@perl.org

read/write to command line opened as a file

2015-04-20 Thread Frank K.
write several commands to the handle and read the output of each command.. Would someone suggest a solution which would allow me to "open" a read/write session to a command line?? Thanks in advance.. flk k

help check a piece of code

2017-04-01 Thread K. Peng
can you help explain the code below? I don't know why the "ref" and "scalar" functions here can be used to validate if it's ASCII or UTF8 encoding. use constant ASCII => ref eval { require Encode; Encode::find_encoding('ascii'); }; use constant UTF8 =>

Order of execution of perl

2005-07-12 Thread S K
Hi I have a script as follows: #!/bin/perl -w sub myOne { my($concept, $opinion) = @_ ; print "$concept " ; print "$opinion " ; } &myOne( "hello", "myviews." ); system("/bin/date"); When I run it

Out of memory! - from CPAN

2006-03-12 Thread Jerry K
"Out of memory!" error message. Can anyone suggest a fix, or a better place to RTFM. thanks, Jerry K `` / 655 # perl -MCPAN -e shell cpan shell -- CPAN exploration and modules installation (v1.86) ReadLine support enabled

Re: Out of memory! - from CPAN

2006-03-12 Thread Jerry K
Hello Owen, thank you for your reply. When I started over again, yes, I did remove .cpan . I have set .cpan to 20 Mb. My .cpan/build directory was at 21 Mb. I cleaned that directory out. I still get the "Out of memory!" error. Jerry K Owen Cook wrote: On Sun, 12 Mar 200

Re: Out of memory! - from CPAN

2006-03-14 Thread Jerry K
for any replies, Jerry K Jerry K wrote: Hello Owen, thank you for your reply. When I started over again, yes, I did remove .cpan . I have set .cpan to 20 Mb. My .cpan/build directory was at 21 Mb. I cleaned that directory out. I still get the "Out of memory!" error. Jerry

Re: Out of memory! - from CPAN

2006-03-16 Thread Jerry K
I have resolved my issue, and I will follow that up with another email. But to answer the questions below. Tom, I am not using perl's malloc, I am using the system malloc. When you asked this question, I also reviewed the perl installation on 8 other stand-alone systems that I have installe

SOLVED - Re: Out of memory! - from CPAN

2006-03-16 Thread Jerry K
SOLVED!!! To answer Tom's question in his email, I am using the system malloc(). I was preparing to completely remove perl again, and re-install from scratch for a 3rd time. My definition of removing perl completely is: removing the compiled perl source code removing my .cpan subdirectory re

Help with "install_driver(Oracle) failed" error message

2019-03-12 Thread Frank K.
CLE_HOME is pointing to the 64 bit drivers so I am at a bit of a loss as to why it’s expecting a 32 bit dll. I have verified the dll is in that path. Any ideas? I’ve Googled a bit and can find a bunch of hacks but….Any help would be most appreciated.. flk k

capture a website and process its data

2004-02-18 Thread A K
this output into a file * How to go further?? Thanks a ton in advance. K.

Kmail, pipe, perl script, result?

2002-11-01 Thread K Pfeiffer
Hi, With KMail one can use a filter to pipe a message somewhere. I have a perl script that will parse a filtered message for a date and then (when run at the commandline) return a "user-readable" result. When I do this in KMail with a filter I never see the returned result. Is there a way (in t

Re: The basics of SWITCH

2002-11-04 Thread K Pfeiffer
Gajo Csaba writes: > Hi, I have a problem with SWITCH. I wrote this, I think > it's clear to anzone what it should do: Just out of curiousity I typed in 'perldoc SWITCH' and 'perldoc -f SWITCH' and found nothing. What is it? (the short answer is fine) Thanks, Kevin -- Kevin Pfeiffer Internatio

writing to log from perl script

2002-11-06 Thread K Pfeiffer
Hi, I was reading up today on syslog and it gave the following shell script example of how to set up a logging service: $ logger -p local5.info "Script terminated normally" I was wondering what the best way might be to do this from a perl script that runs periodically - have it append directly

Re: random strings

2002-11-14 Thread Dave K
Another Way use strict; my @Ary = qw ( a b c d e f g h ); for(@Ary) { print; } print"\n"; fisher_yates_shuffle(\@Ary); for(@Ary) { print; } print"\n"; sub fisher_yates_shuffle { my $array = shift; my $i; for ($i = @$array; --$i; ) { my $j = int rand ($i+1); next if $i == $j;

removing white space

2002-11-21 Thread Mariusz K
Hi, One part of my script ads several strings into one: $text = $part1.$part2.$part3.(...etc) However, if the part3 through part10 were empty I get that many white spaces at the end of $text. I thought the best thing would be just to remove the spaces at the end, but how? (maybe search and r

Re: Getting a variable back

2002-12-16 Thread Dave K
Bob, Consider: cls.pl use strict; my @switches = @ARGV; foreach(@switches) { print"$_\n"; } $ perl -e ' my @clss = ("cls.pl", "one", "two", "three"); system @clss;' output: one two three Takes the first element treats it as an executable and the rest of the list as arguments. HTH "Bob H"

Re: Read-Write Mode Not Working (update)

2002-12-17 Thread Dave K
JLW, perl -pi -e 's/foo/bar/' my_file.txt is supposed to do an inplace edit of my_file.txt, looping over each line, replacing foo with bar. Instead it merely stomps my_file.txt, effectively erasing it. Any body know why? Perl for cygwin, WinNt is the environment. David "Jeff Westman" <[EMAIL PR

Re: Read-Write Mode Not Working (update)

2002-12-17 Thread Dave K
ActiveState docs suggest you can: perl -pi '.orig' -e 's/bar/baz/' fileAto specify the .orig suffix but That did not work for me. perl -pi.bak -e 's/bar/baz/' fileA does! Thanks John "John W. Krahn" <[EMAIL PROTECTED]> wrote in message [EMAIL

Re: postcode regex problem - again.

2002-12-18 Thread Dave K
Gary, is there always a space before the postal code? If so include it as: if ($$line=~/^(.*)\s(\D{1,2}\d{1,2}\s{0,1}\d\D{2})\s*/) { otherwise you may be leaving to chance where the regex engine finds a match HTH "Gary Stainburn" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMA

Re: Sorting hash "values"

2002-12-30 Thread Dave K
$ perl -e ' %hash = ( "h" => 100, "a" => 2000, "z" => 50, "b" => 600 ); for(sort { $hash{$b} <=> $hash{$a} } keys %hash) { print $hash{$_}, " = $_\n"; }' 2000 = a 600 = b 100 = h 50 = z HTH "Rajendra Babu" <[EMAIL PROTECTED]> wrote in message [EMAIL PROT

Re: How to substract words

2003-01-07 Thread Dave K
$ perl -e ' $minuend = 'red'; $subtra = 'Hellored'; $res = $subtra =~ s/$minuend//; print $minuend, "\t", $subtra, "\t", $res;' red Hello 1 $res flags success/fail. If you would like $subtra to remain unchanged assign $dif = $subtra then $res = $dif =~ s/$minuend//; HTH "Pavle Lukic" <[EMAI

Re: "hidden" characters in an input stream

2003-01-08 Thread Dave K
Jason, You didn't say anyting about the OSs involved, but the '\n' *nix eoln versus win '\r\n' is an often encountered problem. if you are *nix and target is or may be win while (my $line = $Telnet->getline(Timeout => 5,)) { $line =~ s/\r\n$\\; chomp $line; ... might do th

Re: Extracting Info from a websource

2003-01-09 Thread Dave K
> Hi listers, Hodwy! > i am a perl beginner with an interesting problem (to me atleast :). > > Problem Overview > - > Somewhere on the world wide web, exists an asp page with the following > form - > These look like 'specs', cool! And I think this format will generate alot of goo

Re: Removing a specific value from a hash whose keys contains multiple values

2003-01-12 Thread Dave K
'compiler_d'], system3 => ['compiler_e'], system4 => ['compiler_f'], system5 => ['compiler_g', 'compiler_h','compiler_i', 'compiler_k'], system6 => ['compiler_l'], ); my ($h, $i, $j, $k, @ok); $j = 0; show(

Re: HELP -- installation of Storable issues warnings ???

2003-01-27 Thread Dave K
Ed, > > [esickafus@webserv01 Storable-2.05]$ perl Makefile.PL > PREFIX=/home/sites/site61/users/esickafus/lib >From the above I deduce you are trying to install modules without root access. True? http://www.cgi-interactive.co.uk/cpan_installing_perl_modules.html Can possibly be of some help. I foun

Re: Even more regex

2003-01-31 Thread Dave K
Dan > I have a string, which is to represent a length of time, say 3d4h45m12s $ perl -e ' $v = "3d7h36m14s"; $v =~ s/d/*24*3600 +/; $v =~ s/h/*3600 +/; $v =~ s/m/*60 +/; $v =~ s/s//; $k = eval $v; print "$v = $k seconds";' 3*24*3600 +7*3600 +36*60 +14 = 286574 seco

Re: Even more regex

2003-01-31 Thread Dave K
Oops! $ perl -e ' @z = qw( 3d20m 5d2h 2h2s ); for $v (@z){ $v =~ s/d/*24*3600 +/; $v =~ s/h/*3600 +/; $v =~ s/m/*60 +/; $v =~ s/s/ +/; chop $v; $k = eval $v; print "$v = $k seconds"; print "\n"; }' 3*24*3600 +20*60 = 260400 seconds 5*24*3600 +2*3600 = 439200 sec

Re: calling a subroutine as an element of a hash table...

2003-02-07 Thread Dave K
Peter I saw Jenda's note and I suggest the code needs simplification. > P.S. you can see where I comment out the ccyymmdd_now function. That > approach works, but is not what I'm shooting for. > > %date_formats = ( > # "ccyymmdd" => {now => \ccyymmdd_now()}, > "ccyymmdd" => {now => s

Re: calling a subroutine as an element of a hash table...

2003-02-07 Thread Dave K
Peter, #!/usr/bin/perl -w use strict; my %date_formats = ( ccyymmdd => { now => sub { my @arr = localtime(); print 'Year ', 1900 + $arr[5] . ' Month '. sprintf("%02d",$arr[4] + 1) . ' Day ' . sprintf("%02d",$arr[3]); } } ); & { $date_formats{ccyymmdd}{now} }; Same output as previous

Re: calling sub

2003-02-09 Thread Dave K
Benjamin Jeeves, You can probably figure this out. Try running the code below supplying whatever file name you choose to save it as for an argument. #!/usr/bin/perl -w use strict; my $filein = $ARGV[0]; print "$filein\n"; open(FILEIN, $filein); my $counter = 0; my $counter1; &start; sub start

Re: help with (do $ENV{HOME})

2003-02-16 Thread Dave K
ktb, Wiggins, Another perspective: text.txt contains: return 'My Full Name with middle initial'; #!/usr/bin/perl -w use strict; my $name = do "./text.txt"; print "$name\n"; prints: My Full Name with middle initial > > The problem I'm having is my print statement just prints a new line > >

Re: linked lists?

2003-02-17 Thread Dave K
Jim, Some time ago a Computer Sci student was working on Linked Lists and posted some code she needed help with. > How would such a thing be done with Perl? Preuse, run, modify and complete this code (it needs a way to remove a center link, amoung other things. I don't take credit for this code

Re: Get list of available modules?

2003-02-25 Thread Dave K
> Greetings! Hello > > I'm trying to do some Perl for a non-profit organization. The computer > administrator doesn't know very much about Perl or about the server. > If I were to ask him what Perl modules were available, he'd probably > just have to call somebody else and get back to me. Is the

Re: adding hash reference into hash

2003-03-03 Thread Dave K
Yannick, $ perl -e ' > %ch = (h1 => {}, h2 => {}); > for (keys %ch) { > print"$_\n"; > }' h1 h2 > Hi, Hello, > I'm just trying to make a structure with a hash containing some > references to other (yet unused) hashes. see above. > > So what I wrote this: > > $intHash1Ref = {}; > $intHash2Ref =

Re: Someone DO explain this to me!

2003-03-07 Thread Dave K
Jeff, > Jenda, > > You CANNOT do what you are suggesting. My guess is that at one time it was allowable. If someone knows what version of Perl allowed loop control modifiers in do{ } blocks (or if they were never allowed) I would like to know. I am using v5.8.0 and I was surprised to try: $ perl -

Re: 1 more ?

2002-06-07 Thread Dave K
Bryan, There are other instances than the example below but this one tripped me recently. my %exhash = ( one => 1, two => 2, thr => 3 ); my $href = \%exhash; my @exary = qw ( zero one two thr four); print $$href{$exary[$$href{two}]}, "\n"; # $$href{two} is 2 # use

  1   2   3   4   5   6   7   8   9   10   >