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
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
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
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
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
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
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
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
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
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
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
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!
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
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:
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
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
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
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
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]
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
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
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,
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
Cool...
http://www.rexswain.com/httpview.html
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
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
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)
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/'
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;
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
- 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
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
- 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
32 matches
Mail list logo