RE: different versions of same Perl module in different Apache vh osts

2004-06-07 Thread Bob Showalter
Andrew Gaffney wrote: > I will end up having more than 2 vhosts, most of which will need a > custom version of this particular module. In that case, I think you'll need to give the modules different names. You could write your handler in such a way that it would recompile the module (switching fla

RE: different versions of same Perl module in different Apache vh osts

2004-06-07 Thread Bob Showalter
Andrew Gaffney wrote: > I didn't really know where to post this since it isn't specifically > Apache or Perl, so I'm posting herejust because :) > > I run 2 vhosts under Apache 1.3.29 (needed for mod_perl-1.x which is > needed by HTML::Mason) on my Gentoo server. One vhost is the current > pro

RE: mime lite

2004-06-04 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > Does anyone see anything logically wrong with my code b/c I am still > not receiving the correct data in the email. The data is a # 1 when > it should be a listing of Ex strings. [snip] > Data=> print "@ftapes" ); This is assigning the

RE: Calling "more" in perl script for large files.

2004-06-04 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > Hi There, > Any pointers to how to call "more" on a file in perl script. > I am writing one script which displays one report to user and then > asks some inputs. > > User need to see complete file. To solve this, I thought I can call > `more in the script and continue.

RE: using Mail::Sendmail

2004-06-03 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > I was looking at the Mail::Sendmail module from CPAN and I did not > find anything that showed printing a body. How do I print a body of > text data from a variable? I haven't used Mail::Sendmail, but it looks like the message body goes in the Message entry of the hash

RE: Module help (local variables in seperate directory)

2004-06-03 Thread Bob Showalter
Andrew Koebrick wrote: > I am having trouble creating a modules which splits its functions and > variables between two files in two separate directories. > > I want to have a set of global functions (i.e. open database > connection...) which would live in the main Perl path, and a local > configu

RE: HTTP

2004-05-27 Thread Bob Showalter
Ramprasad A Padmanabhan wrote: > Are your sure you want to write your own in perl, then you would have > to use LWP or similar modules from CPAN > > But If you want straight download , why dont you just use tools like > "lynx -source" or "wget" or "snarf" Or lwp-download -- To unsubscribe, e-ma

RE: DBM Files

2004-05-20 Thread Bob Showalter
BOLCATO CHRIS (esm1cmb) wrote: > Hello all, > I am fairly new to using Perl and have some questions regarding DBM > Files. The answer to a lot of these questions will be "it depends". It depends on what you're trying to do. > One, which type is recommended DB_File, GDBM, SDBM, NDBM etc.? In gen

RE: perl / unixODBC and Oracle 9i

2004-05-19 Thread Bob Showalter
Johnson, Shaunn wrote: > Howdy: > > I'm running Perl 5.8.x on RHEL ver. 3 and I am > trying to connect to Oracle 9i (both > the database and the Application Server's > repository). > > With Perl 5.6.1, I used DBI and Oracle:DBD > and things worked well, with Perl 5.8.x, the > readme docs for the

RE: Installation Problem -- Text::CSV

2004-05-19 Thread Bob Showalter
Jeff Westman wrote: > Hi All, > > I am running Active Perl 5.8.0, and installed CSV.pm into > c:\perl\lib\text. When I run the test.pl file with it I get > > C:\> perl test.pl > 1..20 > Can't locate auto/Text/CSV/autosplit.ix in @INC (@INC contains: > C:/Perl/lib C:/Perl/site/lib .) at C:/Perl/l

RE: @UNIQUE=unique(@REDUNDANT);

2004-05-19 Thread Bob Showalter
Randy W. Sims wrote: > How would you implement a version of the function that > produced an array where the elements are in the same order and only > the first of any duplicates are kept? @uniq = do { my %seen; grep !$seen{$_}++, @arr }; Or, if you want a function: sub uniq { my %seen; gre

RE: Perl Newbie Question

2004-05-18 Thread Bob Showalter
Perl Mail User wrote: > Hello All, Hi. Providing a real name would be considered polite. Also, please choose a meaningful subject. > > I have a question, I am looking to read the name of the file that I am > passing as an argument to the perl script through the while (<>) part > of > the script

RE: using Sleep instead of Cron

2004-05-18 Thread Bob Showalter
Wiggins d Anconia wrote: > cron can be installed as part of the Cygwin distro, not sure about > other ways. The M$ products come with a scheduler as well, but you > have now exhausted my knowledge of it ;-) The MS "at" service blows huge chunks. There is a cron for Windows at http://cronw.so

RE: working directory with exec command

2004-05-18 Thread Bob Showalter
Peterson, Darren - Contractor.Westar wrote: > I'm trying to use fork and exec to kick-start other processes on a > Linux box. As with Win32::Process::Create, I'd like to somehow > specify or point towards a working directory for the new process > since some data files are expected via relative pat

RE: Find closest value

2004-05-17 Thread Bob Showalter
Mike Blezien wrote: > Hello, > > is it possible, with perl, to find the closest numerical value to a > set value. IE. a set value of 15 and I have five values, > 208,258,56,123 > > is there a function too go through the five values array to find the > closest to 15 ?? Here's an approach that do

RE: Problem with use strict;

2004-05-14 Thread Bob Showalter
MCMULLIN, NANCY wrote: > Hi there. > Brand new to PERL so please bear with me. (I'm running Win32/Apache) Hi. It's "Perl", not "PERL". You're excused since you're brand new :~) > > When I include the line > use strict; > in any perl program, I get the following error: > "Internal Server Error

RE: date manipulation mods

2004-05-13 Thread Bob Showalter
Harry Putnam wrote: > Group, > > Is there a date manipulation module that does the same thing as gnu > `date -d' command? That is, given a spec string, it returns a date in > the past in user selected format. > > Like what gnu `date' would do with: > date -d '-2 weeks' +"%m%d%Y_%T" > 042920

RE: Extracting attachment from mail

2004-05-13 Thread Bob Showalter
NYIMI Jose (BMB) wrote: > I need to write a perl script that will run on solaris and the job of > this script will be : > > - read a mail from a predefined shared mail box (Outlook/Exchange > Server) Mail::IMAPClient or Mail::POP3Client > - extract the mail attachment (text file) > - parse the

RE: Perl::Optomizer

2004-05-13 Thread Bob Showalter
JupiterHost.Net wrote: > Hello list, > > Perl::Tidy is very excellent for making source look nice. > I was wondering if anyone knew of anything that is the same type of > idea but it optomizes your Perl code to run a bit faster: > for instance: > $newvariable = "$howdy"; > should be: >

RE: process signals

2004-05-07 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > If you dont understand my question then I assume you do not know unix > or tail -f ? You're right, those are both new to me. > I want to after a sleep of 5-8 seconds, send a kill > signal to the previous command then increment the counter. thank > you! Sorry, I think

RE: process signals

2004-05-07 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > I have an application system command that is like tail -f in UNIX and > I want to say > > x=1 > while x < 10 > do > 'command' append to log > print "\n" append to log > issue HANGUP or KILL SIGNAL > x+=1 > done > > How do I issue a hangu

RE: Running two process simultaneously

2004-05-05 Thread Bob Showalter
[ stay on-list please, and bottom-post please ] William Black wrote: > I have two perl scripts that need to be run at the same time. > > x.pl > y.pl > > How is this done? You can use a shell to start them both: $ perl x.pl &; perl y.pl & Or, one can fork() and exec() the other: x.pl

RE: Running two process simultaneously

2004-05-05 Thread Bob Showalter
William Black wrote: > How can you run two processes Simultaneously in Perl? perldoc -f fork What are you trying to do? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: How do I append text to a text file - in the 3rd row ?

2004-05-05 Thread Bob Showalter
Aviram, Shy wrote: > Hi, > > I have a text file I open and want to add new text into. However, I > want the new text to be at the 3rd row of the file (below the > headline) and not at the end. Use Tie::File. Super simple. http://search.cpan.org/~mjd/Tie-File-0.96/ -- To unsubscribe, e-mail: [E

RE: Simple DBI question

2004-05-05 Thread Bob Showalter
McMahon, Chris wrote: > Can anyone suggest DBI syntax to capture the result of > > SELECT DISTINCT column1 FROM table WHERE column2= -1 > > into an array? Just a hint would help... my @results = $dbh->selectcol_array('select ...'); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: Problem when use split

2004-04-29 Thread Bob Showalter
John Doe wrote: > ... > When i run script i recive error: > # ./check-size.pl > > bad interpreter: No such file or directory This can be caused by the file containing DOS-style line endings. If the first line is: #!/usr/bin/perl the kernel will include the as part of the file name and try to

RE: Looking for a equivalant function in Perl for main(int argc, char *argv[ ])

2004-04-28 Thread Bob Showalter
Shilpa Arvind wrote: > Hi, > > In C programming language we have a function which looks like this: > > main(int argc, char *argv[ ]). > > Is there a equivalant function in Perl. I was looking at @ARGV but i > feel it does not behave the same way as the above function does. I > might be wrong.

RE: perl mysql question

2004-04-27 Thread Bob Showalter
Christopher Lyon wrote: > Not sure if I should post this to beginners or not but there it goes. > > I have 10+ tables with some of the same information in each in table > of a mysql database. Here is an example: > [snip] > > I need to take the names and add the counts up for between each table >

RE: Controlling bottom posting in outlook

2004-04-26 Thread Bob Showalter
Price, Jason (TLR Corp) wrote: > ... Is > there a utility available that would allow me to bottom post only on > messages I choose? A right click option for bottom posting would be > ideal - anyone know of a utility that can do this? Outlook-QuoteFix can be configured to only reformat wh

RE: printing pod

2004-04-23 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > I would like to be able to print pod sections to the screen, like > have an option to print out my revision history. I'm sure there must > be an easy way to handle thisbut how? The Pod::Usage module comes close to doing what you want; perhaps you can adapt it to you

RE: Reading rss formated sources.

2004-04-22 Thread Bob Showalter
Thomas Williams wrote: > Thanks, but I meant that I am look for advise on reading rss files! My advice is to use XML::RSS. How does that not answer your question? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Reading rss formated sources.

2004-04-21 Thread Bob Showalter
Thomas Williams wrote: > I am trying to build a cgi script that parses RSS files. > > RSS is the name given to a simple and well-established XML format > used to syndicate headlines. XML::RSS on CPAN helps with this. It comes with an example you can use as a basis for your script. http://search.

RE: removing duplicate array values

2004-04-21 Thread Bob Showalter
Jeff 'japhy' Pinyan wrote: > On Apr 21, Bob Showalter said: > > There's a Tie::Array::Unique module on CPAN which gives you a lot > > more flexibility in handling this kind of thing. > > I agree (says the author of the module). It maintains the uniqueness &g

RE: removing duplicate array values

2004-04-21 Thread Bob Showalter
Peterson, Darren - Contractor.Westar wrote: > I'd like to remove duplicate values from an array to leave it with > only unique values. For instance, if an array contains > (1,2,3,1,4,2,5) as values, I'd like to clean out the extra 1 and 2 to > leave the values as (1,2,3,4,5). Does perl have an ar

RE: Please help!

2004-04-20 Thread Bob Showalter
Jason Dusek wrote: > I have code that looks like this: > ... > my $funk = '/home/jdd/sbin/idlwave2outline.pl'; > my $jam = '/home/jdd/sbin/outline2html.pl -p -t'; > my $web_dir = '/home/jdd/www'; > ... > sub makedocs { > $code = $File::Find::name; > $name = $web_dir.'/'.$_; > system(

RE: creating a hash out of 2 arrays

2004-04-20 Thread Bob Showalter
Sanyal, Dibya F (Corporate, consultant) wrote: > Hi, > > I have 2 arrays. One holds all uniq key values of an associative list > (all ssn), other holds the associated values (their names). I need to > create a hash by putting these arrays together. Each entry in that > hash would be (ssn => name).

RE: Test For Dupplicate elements in an array

2004-04-20 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > I need to test if an array holds duplicates, and if so do something. If you just need to check for the presence of a duplicate, something like this will do the trick: sub has_dup { my %seen; $seen{$_}++ && return 1 for @_; } Of course, all the hash-based methods depe

RE: why $a became 6 ?

2004-04-15 Thread Bob Showalter
John W. Krahn wrote: > Or: > > ( $a = 3 and $b = 6 ) if ( 1 == 1 ); or if he intends both assignments to be made together: $a = 3, $b = 6 if 1 == 1; This will set $b to 6 even if $a is set to a false value, which the prior methods won't do. This may or may not be what the OP is after... --

RE: What has been installed

2004-04-15 Thread Bob Showalter
Harter, Douglas wrote: > When you install a Perl module, it is documented in a file. (I know > this because I remember seeing it when I installed modules.) However, > I have not installed any modules for a good while and forgot what the > file name is. > > I would like to find out what extra mo

RE: untaint path

2004-04-15 Thread Bob Showalter
Angie Ahl wrote: > Hi Gary > > That was it. so using the result of a regex test gets around it.. > That's a wise practice. You should read over "perldoc perlsec". It explains how this works: "The only way to bypass the tainting mechanism is by referencing subpatterns from a regular expres

RE: Where do you put your modules?

2004-04-13 Thread Bob Showalter
Kevin Old wrote: > Hello everyone, > > I've written several subroutines that are useful to me, but not useful > enough to package into separate modules and publish on CPAN. I put > them in a module call KOBagOTrix.pm and just use a "use lib" > statement to point to that module on my hard drive. >

RE: installing perl module without root permission

2004-04-13 Thread Bob Showalter
gohaku wrote: > On Apr 9, 2004, at 6:27 AM, Randal L. Schwartz wrote: > > > Yes, and the instructions are included with your copy of Perl, > > in "perldoc perlmodinstall". > > What if perldoc is not included for some reason? perldoc may be installed, but not in your PATH. Perl comes with a numbe

RE: An extremely newbie question about appending records in a fil e.

2004-04-07 Thread Bob Showalter
Weaver, Walt wrote: > Okay, so I do a "perl -pi -e 's/$/;/g' " to try and append a > semicolon to the end of each record in a file in Linux. > > It does that just fine. Unfortunately it also prepends a semicolon > onto the beginning of each record too. Well, not exactly. Note that there's no semi

RE: [OT] last day of a month

2004-04-06 Thread Bob Showalter
Bob Showalter wrote: > set `cal 12 2004` && eval echo \${$#} here's a simpler one that doesn't zap your parameters: : $(cal 12 2004) && echo $_ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.p

RE: [OT] last day of a month

2004-04-06 Thread Bob Showalter
NYIMI Jose (BMB) wrote: > Hello, > > How to get the last day of a month using a korn shell command ? > So far I found the following : > > > echo `cal 12 2004` | awk '{print $NF}' > > Do you have alternative ? I think that one's pretty clever. How about the similar: set `cal 12 2004` && eval

RE: use MD5

2004-04-06 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > All, > > can anyone advise? > I have MD5 config'ed and compiled and it is in my PATH variable. How did you install MD5? If you installed it using the standard method, it should be in the proper location. PATH is irrelevant to Perl module searches. Also, you should use

RE: tempfile

2004-04-06 Thread Bob Showalter
WC -Sx- Jones wrote: > Christian Stalp wrote: > > Hello together, > > I want to create a tempfile via the function tempfile. > > But I want a certain path and name for the file. > > The option DIR and SUFFIX and s.o. is clear to me but how can I > > set the name of the file? For Exam: temp_file.lo

RE: tempfile

2004-04-06 Thread Bob Showalter
Christian Stalp wrote: > Hello together, > I want to create a tempfile via the function tempfile. > But I want a certain path and name for the file. > The option DIR and SUFFIX and s.o. is clear to me but how can I > set the name of the file? For Exam: temp_file.lock or somethink like > that!? T

RE: Subroutine and @_ confusion

2004-04-05 Thread Bob Showalter
Angie Ahl wrote: > ... > These subroutines are called externally ie > HLOM::Links->FindLink(LinkID => $id); > > but also internally ie &FindLink(LinkID => $id); > > I read in Perlsub that doing &FindLink will pass the current @_ to the > subroutine. Great. Only if you omit the argument list as

RE: directory and file operations

2004-04-02 Thread Bob Showalter
WC -Sx- Jones wrote: > MuthuKumar wrote: > > print "Enter a path name: "; > > my $path=; > > chdir($path); > > > chdir never "stays" in the directory... Huh? Sure it does. > > Proof: > > print "Enter a path name: "; > my $path=; > chdir($path); > print `pwd`; That doesn't prove anything. The

RE: Using the read function with an offset

2004-03-30 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > Hi! > > I'm writing some 68k modules, for disassembly, assembly, reading > instructions, analysing instructions, etc. > > The package I'm stuck on is supposed to read a 16bit instruction, and > then break it down into an array, with each element seperated. > > So far,

RE: hash

2004-03-29 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > any ideas on how I can access say all the values of a hash and not > care what the keys are? @arr = values %hash; perldoc -f values -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Your recommendations to tie multi-level data structures

2004-03-29 Thread Bob Showalter
Phil Schaechter wrote: > All, > > I would like the ability to tie a database and use it as a > multi-level data structure, like > > $tied{hash}{subhash} > $tied{hash}{array}[0] > > Etc... > > Any recommendations for this? I've heard I should check out the > MLDBM module. How have others conque

RE: problem with fork & wait

2004-03-29 Thread Bob Showalter
T.S. Ravi Shankar wrote: > Hi, > > At reaching a certain point in my perl program, I need to run a > process ( say XYZ ) using SYSTEM command. The result file that this > process would produce will be result.. I will have to > wait until this result file is produced & then proceed extracting > c

RE: Find User Apache is running as

2004-03-29 Thread Bob Showalter
JupiterHost.Net wrote: > Hello List! > > I was trying to figure out how to see the user the script/webserver is > running as. (Like Apache is 'nobody' or the owner 'foomonkey' perhaps > with SuExec enabled) > > I looked in %ENV and didn't see it in there. Are you trying to find out from a CGI sc

RE: Incrementing count

2004-03-29 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > I'm sorry, the previous subject should have been changed. My > apologies. > > > while () { >$counter++; > } > > I know this is probably simple, but how would I increment by 20? In > other words, $counter would increment 1 time for every twenty lines > of the fil

RE: Using Perl Expect.pm

2004-03-26 Thread Bob Showalter
TapasranjanMohapatra wrote: > Hi, > Can someone tell me how to handle the vt100 sequences using expect > module of perl. I have used the same sequences while using TCL > Expect. It works fine. But I don't understand what is the problem > while I try doing the same thing using Perl Expect. If my T

RE: sort

2004-03-26 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > any modules out there that can sort things such as.. BB10, > BB1100,BB11. I want it to be in this order. BB10,BB11,BB1100. Erm, that's lexical order. $ perl -le 'print for sort @ARGV' BB10 BB1100 BB11 BB10 BB11 BB1100 Am I missing something? -- To unsubscribe, e-m

RE: sort function?

2004-03-25 Thread Bob Showalter
Radhika Sambamurti wrote: > Hi, > I have written a small script that is supposed to tell me the oldest > file in my directory (as per ctime). I have read the various times > the various files were created, into an array called times. I have > then sorted this array - @sorted_times. when i do ls -l

RE: QUERY_STRING

2004-03-24 Thread Bob Showalter
Mike Ni wrote: > Is there any place we can look up the definition > of these such as "CONTENT_LENGTH" & query_string. For the environment variables: http://hoohoo.ncsa.uiuc.edu/cgi/env.html For the HTTP headers that these variables are derived from: http://www.w3.org/Protocols/rfc2616/rfc

RE: use lib

2004-03-24 Thread Bob Showalter
B. Fongo wrote: > Is it recommendable to use the pragma "use lib " when installing a > program on a server shared by many users? > Assuming my IPS did not install certain CPAN modules which my needs, > and I decide to install them in my www directory. > In such a scenario, putting "use lib" on my s

RE: Locatiing Self-Installed Modules

2004-03-23 Thread Bob Showalter
Ron Goral wrote: > Sorry, not sure what "bottom post" means. It means posting your new material below that which you are responding to, rather than at the top of the message. Lots of folks (me included) find this makes the thread easier to follow. Others disagree. If you use Outlook or Outlook Ex

RE: $dbh->do('\@proc')

2004-03-23 Thread Bob Showalter
Jayakumar Rajagopal wrote: > Hi all, >I have to use PERL to run ".sql" files ( for eg. > runstmts.sql), which I do this way in SQL prompt : > > SQL> @runstmts I'm guessing Oracle sqlplus? > > I tried using $dbh->('[EMAIL PROTECTED]') and $dbh->('start > runstmts.sql')... bu

RE: Overriding 'die' Functions

2004-03-22 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > ... > Sometimes my script throw a die and I just know the line where was > throw. What I want is to have the all stack, something like java. Look at the standard module 'Carp'. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

RE: Improving performance when working with large text files

2004-03-12 Thread Bob Showalter
Price, Jason wrote: > I'm trying to optimize a script used for processing large text log > files (around 45MB). I think I've got all the processing fairly well > optimized, but I'm wondering if there's anything I can do to speed up > the initial loading of the file. > > Currently, I'm performing

RE: how to make sure, that the script is running one time?

2004-03-12 Thread Bob Showalter
Christian Stalp wrote: > Hello together, > I have a question regarding process-control. I want to write a perl > script which must not running in more than one process in the same > time. The script creates a directory copys a zip-file in it, unpack > it and reads every file in this package. Howeve

RE: how to get the buffer size of a string

2004-03-11 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > length() Returns the length in characters. How do I translate that > to bytes? Read 'perldoc bytes' for an example of how to do this. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Code Socket Port... Read In and sent out to perl script

2004-03-05 Thread Bob Showalter
Bob Showalter wrote: > ... > warn "Received connection from $host, writing to $file\n"; > open F, ">$file"; Stick some error checking in there :~) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

RE: Code Socket Port... Read In and sent out to perl script

2004-03-05 Thread Bob Showalter
Paul Kraus wrote: > I hate to ask for code but I am kind of in a crunch to finish a > project. See below. > > I have the network programming with perl but it's just too much to > read by tomorrow night :) Buy the Perl Cookbook. It has good examples for this kind of thing. > > I need a daemon

RE: Array of objects

2004-03-04 Thread Bob Showalter
Jayakumar Rajagopal wrote: > Hi , > I have to store list of objects in Array. At the end, @arr contains n > copies of last $obj, but not every $obj created. I tried storing both > object, ref of object. Array contains different references, but same > data. Please help. > thanks, > Jay > > the cu

RE: Forking

2004-03-03 Thread Bob Showalter
wolf blaum wrote: > On Wednesday 03 March 2004 21:57, Bob Showalter generously enriched > virtual reallity by making up this one: > > Hi, > > > > - "1 while wait() > 0" > > > > That just reaps the exit statuses to prevent zombies; the chi

RE: Forking

2004-03-03 Thread Bob Showalter
Price, Jason wrote: > Bob, > > Thanks for the input - it's quite helpful. However, I don't fully > understand some of the code - maybe you could help clear it up for > me. The parts I'm unclear on are: > Wolf's aready explained most everything. I'll throw in a bit more... > - the usage of "pi

RE: Forking

2004-03-03 Thread Bob Showalter
Price, Jason wrote: > Not sure if this is the right list for this - if it's not, please > direct me to the proper list. You've come to the right place. > > Anyway, I'm trying to get my hands around forking, and was hoping you > all could help me out. Basically, I'm trying to find a way to fire

RE: links in POD

2004-03-03 Thread Bob Showalter
Freimuth,Robert wrote: > Hi all, > > I'm trying to use POD to document my application. I have about 5 > different doc files, and I'd like to create links between them when > they are translated from POD to HTML. For example, in doc file 1 I'd > like to say '...using the foo function, as describe

RE: ENV variables and custom 404 error page

2004-03-02 Thread Bob Showalter
Bryan Harris wrote: > > # do this. make sure that this line is the > > # ONLY thing you print out to the browser. > > print "Location: http://rightplace.com/\n\n";; > > > Wow, this is cool! Where is this documented? I'm interested in > learning about other things like this... This

RE: trouble with writing to file

2004-03-01 Thread Bob Showalter
incognito wrote: > Thank you for your attention, Bob. > > > What is your actual regex? At a minimum, you'll need /g modifier. > > You may need /m and/or /s as well. > > May be I didn't explained my prob exactly. > I don't have a problem with the regex (and yes, I have the /m /g and > /s). Related

RE: trouble with writing to file

2004-03-01 Thread Bob Showalter
Reinhard Mantey wrote: > undef $/; > my $input = <>; > my $pkg_filename = "longnames.txt"; > > open(FH, "> $pkg_filename") or die "could not create $pkg_filename"; > while ($input =~ m/.../) { What is your actual regex? At a minimum, you'll need /g modifier. You may need /m and/or /s as well.

RE: Assigning elements to array (U)

2004-03-01 Thread Bob Showalter
Meidling, Keith, CTR, ISD wrote: > UNCLASSIFIED > > I tried that, and I get the following error... > > Possible attempt to separate words with commas at C:\test.plx line > 6. > 'Start > test', > 'Stop > test' You should only get that warning if you used qw(), which Gary didn't. @arr = qw('f

RE: newline or CR with join function

2004-02-26 Thread Bob Showalter
Gregg O'Donnell wrote: > Greetings all, > Instead of joining my scalars with ',' I'd like each to appear on a > newline. Replacing ',' with '\n' doesn't work. Suggestions? Thanks! > > my $cfor_edu = join (',',$bs_alma,$bs,$ms_alma,$ms); You need to enclose \n in double quotes. Inside single quot

RE: Testing for STDIN

2004-02-25 Thread Bob Showalter
Timothy Donahue wrote: > I have a program that I am writing that I need to accept input from > either STDIN (for file redirections or pipes) or from the > command-line. The program manipulates email addresses for our mail > servers, so I should have the option to do either 'email_add > [EMAIL PROTE

RE: Changing directory and running a program

2004-02-25 Thread Bob Showalter
Ned Cunningham wrote: > HI all. > > Can anybody tell me how to execute a command "remotely" in a Perl > script from a different directory. > Please keep in mind I am asking what I want, not what you think I > meant to say. > > I need to: > > ('cd /d e:\ned\nedsdir`); > (`runprogram.exe -optio

RE: Digest::MD5

2004-02-20 Thread Bob Showalter
Dave Tibbals wrote: > > What line is make complaining about the missing separator? > > What does the Makefile look like around that line? > > > > From CPAN shell, you can do the following to run the steps > > separately: > > > >look Digest::MD5 > >$ perl Makefile.PL > >$ make > > >

RE: Digest::MD5

2004-02-20 Thread Bob Showalter
[redirectinb back to list] Dave Tibbals wrote: >> Dave Tibbals wrote: >>> I am attempting to install the module Digest::MD5 and it fails with >>> the makefile for the module. The error reported is "*** missing >>> separator. Stop". >> >> Something's wrong with the Makefile. This can happen if tab

RE: Digest::MD5

2004-02-20 Thread Bob Showalter
Dave Tibbals wrote: > I am attempting to install the module Digest::MD5 and it fails with > the makefile for the module. The error reported is "*** missing > separator. Stop". Something's wrong with the Makefile. This can happen if tabs get expanded to spaces or if DOS-style line endings are used

RE: Could I put commands in a variable

2004-02-19 Thread Bob Showalter
Joel wrote: > Yes, BASIC is the only programming I have ever done. All I can really > remember was PRINT, GOTO, and a variety of line numbers. I'm trying > to write a text adventure (Don't look at me like that, Perl is a > general purpose language!). I'm getting tired of writing large chunks > of c

RE: Why does this keep happening?

2004-02-17 Thread Bob Showalter
Joel wrote: > I'm running perl under windows XP and I keep geting this error: > > syntax error at (Directory and filename) Line 6, near " ) > {" > syntax error at (directory and filename) line 9 near "}" > > The source code is below, but this happens with loops in general. Any > ideas? > >

RE: [OT] Apache internal server redirects

2004-02-17 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > I have an internal server that I need to pass external visitors to > from a web page. The internal server isn't set up to go through the > firewall so I am looking for a way to make web server (which does > play nice) to access the other server via http and let a user ac

RE: How to call perl with in-line contents?

2004-02-13 Thread Bob Showalter
Vishal Vasan wrote: > Hi All, > > I have a file with the following contents (temp.txt). > A1110 > G1115 > B1110 > C > D > E1113 > F1115 > and so on. I have to read the contents from this file and create 2 > seperate files. The 1st file contains the lines ending with 0 and 1 > while the 2nd

RE: get_uid sub critic

2004-02-09 Thread Bob Showalter
Kenton Brede wrote: > I've written the following subroutine to snag the next available UID > in the 700 range from /etc/passwd. I then use the return value with > "useradd" to add a new user. Note that this algorithm contains a race condition. Between the scan of /etc/passwd and the call to usera

RE: Uploading large files thru HTTP

2004-02-09 Thread Bob Showalter
Bob Showalter wrote: > Nilay Puri, Noida wrote: >> Hi all, >> >> I am uplaoding files from one server to another server using Perl >> HTTP post. >> >> But when the file size increases to 2 MB , i get error. >> >> Is there any way I can speci

RE: Uploading large files thru HTTP

2004-02-09 Thread Bob Showalter
Nilay Puri, Noida wrote: > Hi all, > > I am uplaoding files from one server to another server using Perl > HTTP post. > > But when the file size increases to 2 MB , i get error. > > Is there any way I can specify the max file size ? You can only do this if you control the server. Do you? --

RE: Sending mails

2004-02-04 Thread Bob Showalter
Nilanjana Bhattacharya wrote: > Hello everybody, > > I have two radio buttons in a form. I want - When any one clicks on > button "A" a mail will be sent to "A" & when any one clicks on button > "B" mail will be sent to button "B". In both the cases whether > someone clicks on A or B I will receiv

RE: Array subtraction, like sets

2004-01-30 Thread Bob Showalter
Robin Sheat wrote: > Hey there, what is a nice way of doing what this looks like it should > do: > > @a=([1,2,3],[5,5,5],[9,8,7]); > @b=([5,5,5],[1,2,3]); > @[EMAIL PROTECTED]@b; > > and have @c == ([1,2,3]); > > Is there a good way of doing this? (I've tried the obvious things on > the command

RE: error but code works

2004-01-29 Thread Bob Showalter
Gary Stainburn wrote: > Hi folks, > > I've got the following code which works, but generates the error > message following it. I've tried varying the code to eliminate the > error but I only manage to get either the working code with error or > non-working code without error. > > (Line 95 is the

Re: binary perl

2004-01-24 Thread Bob Showalter
Dan Brow wrote: > Is it possible to make a perl script/program a binary file? For bundling, yes. For hiding source, not really. > I have a > few scripts some one wants but I don't want them to have the source. > I tried perlcc but I want it to remain perl not c, if that's possible > or realisti

RE: can i do it with perl ?

2004-01-23 Thread Bob Showalter
Joe Echavarria wrote: > I there, > > I need to write a web database application using > perl, and i need a way that when the users logs into > the system i download all the information regarding > to the user to its local computer and make all the > transaction locally. After that, when t

RE: Convert Date to week number

2004-01-23 Thread Bob Showalter
Tim wrote: > At 03:16 PM 1/23/04 +, you wrote: >> ... >> Why not write it yourself? >> >> You need to know: >> >> - Which day of the week is the 'first'. >> >> - Which was the first week of the year that had four or more days. >> That's week one. >> >> Then do the sums/arithmetic/math/ma

RE: search an replace

2004-01-22 Thread Bob Showalter
Steve Grazzini wrote: > rmck wrote: >> But I run this system call and it took allnight to run :( > > You were asking perl to rewrite the whole file for every line > you wanted to change. > > #!/usr/bin/perl > use strict; > use warnings;# or just use Foo::Monkey :-) > >

RE: format localtime()

2004-01-21 Thread Bob Showalter
rmck wrote: > I cant get localtime to print in "mm-dd- hh:mm:ss" , I keep > getting it like so "Sun Dec 28 03:35:19 2003" POSIX::strftime gives you complete control over the format. use POSIX 'strftime'; print strftime('%m-%d-%Y %H:%M:%S', localtime), "\n"; perldoc POSIX -- To unsubscr

RE: String manipulation

2004-01-19 Thread Bob Showalter
Jerry Preston wrote: > Hi! > > I am trying to figure out a simple, Perl way to break down any sting > similar to the following: > > $s0 = > "01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25, > 26,27,28,29"; > > Or in any numeric order. The string cannot be longer than

<    1   2   3   4   5   6   7   8   9   10   >