Re: I need some concepts about binmode

2001-12-31 Thread Roger C Haslock
I quote from perlfaq5:- How do I randomly update a binary file? If you're just trying to patch a binary, in many cases something as simple as this works: perl -i -pe 's{window manager}{window mangler}g' /usr/bin/emacs However, if you have fixed sized records, then you might do something

Question regarding placing specific items with a file

2001-12-31 Thread Darryl Schnell
I am starting to look into the option of an online signup form that will create website space within my web network but I am not sure how to accomplish this one part and would like to ask the list for some suggestions/advice. To further help your answers I cannot get additional IP assignments

Re: A little off topic, but still deals with CGI, just the results.

2001-12-31 Thread fliptop
Brian N. Smith wrote: When save to a file, I have a bunch of ^M characters .. I wrote a little strip to try to get rid of them, but of course, I tried the ^M instead of whatever I should have had done ... any help? #!/usr/bin/perl open (myFile, in_file); open (myOut, out_file); while

Re: Question regarding placing specific items with a file

2001-12-31 Thread Roger C Haslock
Trivially, you can wrap each Virtual host section in its own IFDefine bracket, and append that to httpd.conf. More tidily, you can open a temp file, prefix it with IFDefine, write all the VHost data to it, close it with /IFDefine, and append that to httpd.conf. Does it matter if there are

Re: regexp to replace double with single quotes inside html tags

2001-12-31 Thread Nestor Florez
John, can you explain the piece of code that you wrote. Thanks and happy new year :-) - Original Message - From: John W. Krahn [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, December 30, 2001 3:38 AM Subject: Re: regexp to replace double with single quotes inside html tags

Re: regexp to replace double with single quotes inside html tags

2001-12-31 Thread John W. Krahn
Nestor Florez wrote: From: John W. Krahn [EMAIL PROTECTED] Birgit Kellner wrote: while ($string =~ /([^]*?)/gs) { my $var = $1; $string =~ s/$var/$var'/;} print qq|$string\n|; $string =~ s/([^]+)/$a=$1;$a=~tr||'|;$a/eg; can you explain the piece of

RE: Would anybody tell me what is the meaning of foo ?

2001-12-31 Thread David H. Lynch Jr.
A related term of pretty much the same parentage is SNAFU Situation Normal All Fouled Up I am pretty sure both terms originated during WWII. -Original Message- From: Matt C. [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 30, 2001 7:22 PM To: [EMAIL PROTECTED] Subject: Re: Would

Re: Newbie - #include virtual in my .SHTML file just displays the contents of the CGI

2001-12-31 Thread Andrea Holstein
Dale W wrote: If I run the script from my browser, it works great. When I call the CGI file from my SHTML file, it just dumps all of the text from the CGI file into the brower. Here is a simple example: -MY.SHTML !--#include virtual=/cgi-bin/my.cgi-- I don't know something about

Re: Making Cygwin and Apache and Perl Play Nice

2001-12-31 Thread Maxim Berlin
Hello Richard, Monday, December 31, 2001, Richard S. Crawford [EMAIL PROTECTED] wrote: RSC Here's the problem. When I run Perl scripts under win2k, I have to include RSC this as the first line of each CGI script: RSC #! c:/perl/bin/Perl.exe RSC But when I run them under Linux, I

RE: child processes and environment variables

2001-12-31 Thread Maciejewski, Thomas
cant control it ... my company appends it to all messages sent from the company sorry -Original Message- From: Andrea Holstein [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 29, 2001 9:01 AM To: [EMAIL PROTECTED] Subject: Re: child processes and environment variables Thomas

Reidrecting STDOUT to an already open filehandle

2001-12-31 Thread Bob Byles
I am developing a script that is being used in a data warehousing environment on an NT server. I am logging the script's activity (log err) in files under a folder specific to each multidimensional cube that is processed. Multiple instances of this script can be running concurrently because I

move

2001-12-31 Thread Michael McQuarrie
I'm sure this is a dumb question. It seems like one anyways. Is there a move command in perl? I know I can copy then unlink a file but I cant find a move (or similar) command. -Michael __ Do You Yahoo!? Send your FREE holiday greetings online!

RE: move

2001-12-31 Thread McCollum, Frank
I think 'system(mv, /dir/file, /dir2/file);', will only work if you have access to unix functions. system(mv, /dir/file, /dir2/file); -Original Message- From: Michael McQuarrie [mailto:[EMAIL PROTECTED]] Sent: Monday, December 31, 2001 10:51 AM To: [EMAIL PROTECTED] Subject: move

RE: move

2001-12-31 Thread Kipp, James
yes will work in win32 as well. I guess 'rename' would be better, avoids usig shell function call. -Original Message- From: McCollum, Frank [mailto:[EMAIL PROTECTED]] Sent: Monday, December 31, 2001 11:03 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE:

Re: move

2001-12-31 Thread Roger C Haslock
The File::Copy module provides two basic functions, copy and move, which are useful for getting the contents of a file from one place to another. - Original Message - From: Michael McQuarrie [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 31, 2001 3:51 PM Subject: move

Re All: move

2001-12-31 Thread Michael McQuarrie
Thanks for all your help. --- Michael McQuarrie [EMAIL PROTECTED] wrote: I'm sure this is a dumb question. It seems like one anyways. Is there a move command in perl? I know I can copy then unlink a file but I cant find a move (or similar) command. -Michael

question -- beginner's programmer's block

2001-12-31 Thread Booher Timothy B 1stLt AFRL/MNAC
Hello - I am trying to figure out how to convert an output file to a comma separated values file. The original file is of this form: * foo *** thingA: 12 thingB: 23 thingC: 21

RE: question -- beginner's programmer's block

2001-12-31 Thread Hanson, Robert
I'm not sure that I completely understand, so this may or may not help. Anyway, I hope it does. If I understand correctly you want to grab each section and pass it to the appropriate sub for processing. There are lots of ways to do this, but this way came to mind first. It all works around

Making a phone call

2001-12-31 Thread Jose Vicente
Hi friends. I am looking for a module to make a phone call, please tell me if you know one. Bye and Thanks a lot. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Left side variable interpolation during associative arrayassignment?

2001-12-31 Thread Andrew Koebrick
I am trying to build up associative arrays using a looping draw from a database. I would like to end up with one or more arrays(depending on number of elements in the @Dataset) named %sub0, %sub1, %sub2... and so on. I need to keep these arrays around for latter manipulation. What I have

RE: How to create an object with perl ?

2001-12-31 Thread boumans
an alternative might be a beginners tutorial to OO programming in perl that i wrote... check it out here: http://www.japh.nu/index.cgi?base=tuts hth, jos Quoting Peter Cornelius [EMAIL PROTECTED]: There's some great documentation on this. Check out 'perldoc perltoot' on your local

RE: Left side variable interpolation during associative array assignment?

2001-12-31 Thread Hanson, Robert
Well I'm not sure why you would want to do it that way, but it can be done... ${$arrayname}{$columns[0]} = $columns[1]; You may be better off with an array of hashes... my @data = (); while( my @columns = $cursor-fetchrow ) { my %tmp = () $tmp{$columns[0]} = $columns[1]; push @data,

add text to the end of a word. HELP!!

2001-12-31 Thread Peter Lemus
Hi I need to add a word to the end of a word inside a file. HELP PLEASE for example: I will read a file with these names july tony richard then I want to add the following to the name @minime.com. So it will look like [EMAIL PROTECTED] = Peter Lemus UNIX/NT Networks Engineer [EMAIL

Rex Swain's HTTP Viewer

2001-12-31 Thread Gary Hawkins
Cool... http://www.rexswain.com/httpview.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Left side variable interpolation during associative array assignment?

2001-12-31 Thread Peter Cornelius
Before I point to the problem here, let me point out that you are trying to use symbolic references which will severely decrease the readability of your code. soapbox I personally believe that symbolic references are one of the many forms of evil perl which, while appearing elegant, merely

Re: add text to the end of a word. HELP!!

2001-12-31 Thread Bradford Ritchie
Wow! Your question sounds really urgent. Did you get talked into converting a contact database into a bulk email sender? I hate when that happens. Whether or not that's what you're doing, this should help: $email = $name . '@minime.com'; # i'm pretty sure this works Look up the '.' (dot)

Re: add text to the end of a word. HELP!!

2001-12-31 Thread John W. Krahn
Peter Lemus wrote: Hi I need to add a word to the end of a word inside a file. for example: I will read a file with these names july tony richard then I want to add the following to the name @minime.com. So it will look like [EMAIL PROTECTED] perl -pli -e's/$/\@minime.com/'

Re: add text to the end of a word. HELP!!

2001-12-31 Thread James Kelty
Assume that $file is the names file that you have. !/usr/bin/perl -w $file = qq(./file); $newfile = qq(./newfile); open FILE, $file or die Cannot open file $file: $!\n; open INFILE, $newfile or die Cannot open file $newfile: $!\n; while (FILE) { chomp($_); s/(.*)/$1\@feathertrip\.net/i;

perl on Mac OSX

2001-12-31 Thread John Gilger
I am not sure whether this is a perl question or a Mac question, but I haven't found a good OSX list yet so please bear with me. I have tried to find the answer in Learning Perl, Programming Perl, and the Perl Cookbook without success. I write the scripts exactly the same as I do on a Linux

Re: add text to the end of a word. HELP!!

2001-12-31 Thread Leon
- Original Message - From: Peter Lemus [EMAIL PROTECTED] Hi I need to add a word to the end of a word inside a file. HELP PLEASE for example: I will read a file with these names july tony richard then I want to add the following to the name @minime.com. So it will look like

RE: perl on Mac OSX

2001-12-31 Thread scott.lutz
What if you try this %perl filename.pl If this runs then it just means that your path_to_perl is wrong on your shebang line. Happy New Year all!! -Original Message- From: John Gilger [mailto:[EMAIL PROTECTED]] Sent: Monday, December 31, 2001 6:27 PM To: [EMAIL PROTECTED] Subject: perl

Re: add text to the end of a word. HELP!!

2001-12-31 Thread Leon
- Original Message - From: Ahmed Moustafa [EMAIL PROTECTED] Newsgroups: perl.beginners To: Leon [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Can you open a file for reading and writing as the same time? I have asked the question of can I read and write to the same file simultaneously, such