[25484] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 7728 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 3 03:05:41 2005

Date: Thu, 3 Feb 2005 00:05:17 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 3 Feb 2005     Volume: 10 Number: 7728

Today's topics:
        "Re-run script" sub bogdan_czyz@hotmail.com
    Re: "Re-run script" sub <1usa@llenroc.ude.invalid>
    Re: "Re-run script" sub <tadmc@augustmail.com>
    Re: [OT] Google Groups posters, please read <abigail@abigail.nl>
    Re: [OT] Google Groups posters, please read <tassilo.von.parseval@rwth-aachen.de>
        a very bad question <leo.hou@gmail.com>
    Re: a very bad question <larry_wallet@yahoo.com>
        can Perl Sort do this, unix sort breaks on it (muliple  (colin_lyse)
    Re: can Perl Sort do this, unix sort breaks on it (muli <toreau@gmail.com>
    Re: capturing perl forks <ebohlman@omsdev.com>
        Fork, processes and exit codes? <joe_Lucy1107354790266560xd4bad4@example.com>
    Re: Free perl obfuscation service <groleau+news@freeshell.org>
        How to stop print newline with autoflush handle on? <dz_ny@hotmail.com>
    Re: How to stop print newline with autoflush handle on? (Peter J. Acklam)
    Re: How to stop print newline with autoflush handle on? <dz_ny@hotmail.com>
    Re: How to stop print newline with autoflush handle on? (Peter J. Acklam)
    Re: perl quick date convert asdfq213rr23we@yahoo.com
    Re: perl quick date convert <tadmc@augustmail.com>
        perlgtk embed window <none@nospam.com>
    Re: problem with LWS <spamtrap@dot-app.org>
        Re:[OT]  a very bad question <tintin@invalid.invalid>
        sharing perl scripts over domains asdfq213rr23we@yahoo.com
    Re: sharing perl scripts over domains <tadmc@augustmail.com>
    Re: sharing perl scripts over domains <nospam@bigpond.com>
    Re: sharing perl scripts over domains <nospam@bigpond.com>
        test webmaster@infusedlight.net
    Re: test <1usa@llenroc.ude.invalid>
        Whitespace mystery? squash@peoriadesignweb.com
    Re: Whitespace mystery? <jl_post@hotmail.com>
    Re: Whitespace mystery? squash@peoriadesignweb.com
    Re: Whitespace mystery? squash@peoriadesignweb.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 2 Feb 2005 15:45:10 -0800
From: bogdan_czyz@hotmail.com
Subject: "Re-run script" sub
Message-Id: <1107387910.894262.293180@c13g2000cwb.googlegroups.com>

Hi,

I'm trying to write a script that has a sort of "re-run itself"
procedure. I'm trying to figure out how to put that sort of code within
a script. For example:


## Begining of the script
&Startup;
 ....
&sub1;
if ( &sub3($param) =~ /good/ ){
&sub2;
}else{
&sub_emerg;
&rerun_everything;
}
 ....
&sub4;
## End of the script

What would the best approach be to make script to re-run (run
everything from &Startup) from within rerun_everything sub?
Thanks in advance for any suggestions,
Bogdan



------------------------------

Date: Thu, 03 Feb 2005 00:30:48 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: "Re-run script" sub
Message-Id: <Xns95F1C68B225CFasu1cornelledu@127.0.0.1>

bogdan_czyz@hotmail.com wrote in news:1107387910.894262.293180
@c13g2000cwb.googlegroups.com:

> I'm trying to write a script that has a sort of "re-run itself"
> procedure. 

What is a 'sort of re-run itself procedure'? I am asking very seriously.

> ## Begining of the script

use strict;
use warnings;

> &Startup;

You should not use the ampersand notation to call subroutines unless you 
specifically need the features associated with it. That means, if you 
don't know what those features are, call your subroutines simply as:

startup();

(see perldoc perlsub for more information).

It seems to me that you have a ton of global variables which each 
successive subroutine acts on. Not really a good idea.

> ....
> &sub1;
> if ( &sub3($param) =~ /good/ ){
> &sub2;
> }else{
> &sub_emerg;
> &rerun_everything;
> }
> ....
> &sub4;
> ## End of the script
> 
> What would the best approach be to make script to re-run (run
> everything from &Startup) from within rerun_everything sub?

I have no idea what best is because I do not know what you are trying to 
do. Does the following help?

#! perl

use strict;
use warnings;

$| = 1;

run() while 1;

sub startup { 'startup' }
sub sub1 { 'sub1' }
sub sub2 { 'sub2' }
sub sub3 { 'sub3' }
sub teardown { 'teardown' }

sub run {
    print startup(), sub1(), sub2(), sub3(), teardown();
}

__END__

Sinan

__END__


------------------------------

Date: Wed, 2 Feb 2005 18:54:47 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: "Re-run script" sub
Message-Id: <slrnd02tin.29v.tadmc@magna.augustmail.com>

bogdan_czyz@hotmail.com <bogdan_czyz@hotmail.com> wrote:

> I'm trying to write a script that has a sort of "re-run itself"
> procedure. I'm trying to figure out how to put that sort of code within
> a script. For example:
> 
> 
> ## Begining of the script
> &Startup;

   Startup();

> &sub1;

   sub1();

> &sub2;

   sub2();

> &sub_emerg;

   sub_emerg();

> &rerun_everything;

   rerun_everything();


> &sub4;

   sub4();


see

   perldoc perlsub

for why.


> What would the best approach be to make script to re-run (run
> everything from &Startup) from within rerun_everything sub?


But it in a block, redo() the block:


   BEGIN: 
   {  Startup();

      ...

      redo BEGIN;
   }


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: 02 Feb 2005 23:19:15 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: [OT] Google Groups posters, please read
Message-Id: <slrnd02nvj.a9.abigail@alexandra.abigail.nl>

Tassilo v. Parseval (tassilo.von.parseval@rwth-aachen.de) wrote on
MMMMCLXXIII September MCMXCIII in <URL:news:slrnd02gjo.17g.tassilo.von.parseval@localhost.localdomain>:
@@  Also sprach Paul Lalli:
@@  
@@ > Recently, this newsgroup has seen a deluge of Google Groups posters who
@@ > apparently don't read or ignore Google Groups's own advice.  I would
@@ > encourage all Usenet regulars who become annoyed at this tendency to
@@ > refer the offenders to this policy.
@@  
@@  Or even simpler:
@@  
@@  [*]
@@  Score: =-9999
@@  %Expires:
@@  User-Agent: G2/0\.2
@@  %EOS
@@  
@@  Postings made via google will end up in malformatted code snippets
@@  anyway, so I don't see any reason why I should not killfile them,
@@  regardless of netiquette.


Same here, except that my entry reads:

    [*]
    Score:: -9999
      [ 656 lines deleted ]
      Organization: http://groups\.google\.com



Abigail
-- 
BEGIN {print "Just "   }
END   {print "Hacker\n"}
CHECK {print "another "}
INIT  {print "Perl "   }


------------------------------

Date: Thu, 3 Feb 2005 06:35:22 +0100
From: "Tassilo v. Parseval" <tassilo.von.parseval@rwth-aachen.de>
Subject: Re: [OT] Google Groups posters, please read
Message-Id: <slrnd03e0q.qh.tassilo.von.parseval@localhost.localdomain>

Also sprach Abigail:

> Tassilo v. Parseval (tassilo.von.parseval@rwth-aachen.de) wrote on
> MMMMCLXXIII September MCMXCIII in <URL:news:slrnd02gjo.17g.tassilo.von.parseval@localhost.localdomain>:

> @@  [*]
> @@  Score: =-9999
> @@  %Expires:
> @@  User-Agent: G2/0\.2
> @@  %EOS
> @@  
> @@  Postings made via google will end up in malformatted code snippets
> @@  anyway, so I don't see any reason why I should not killfile them,
> @@  regardless of netiquette.
>
>
> Same here, except that my entry reads:
>
>     [*]
>     Score:: -9999
>       [ 656 lines deleted ]
>       Organization: http://groups\.google\.com

I still have the hope that one day google will fix the indentation of
postings in which case they'd bump up the version number to 0.3 so I
would see these postings again. If they don't fix that in 0.3, I'd have
to adjust the scorefile entry accordingly, of course.

Tassilo
-- 
use bigint;
$n=71423350343770280161397026330337371139054411854220053437565440;
$m=-8,;;$_=$n&(0xff)<<$m,,$_>>=$m,,print+chr,,while(($m+=8)<=200);


------------------------------

Date: 2 Feb 2005 17:36:20 -0800
From: "leo.hou@gmail.com" <leo.hou@gmail.com>
Subject: a very bad question
Message-Id: <1107394580.644080.49610@c13g2000cwb.googlegroups.com>

Hi guys, prepare for a bad question... I want to know how to pronounce
"~" and "#" in English



------------------------------

Date: 2 Feb 2005 18:20:00 -0800
From: "Larry" <larry_wallet@yahoo.com>
Subject: Re: a very bad question
Message-Id: <1107397200.107059.28490@z14g2000cwz.googlegroups.com>


leo.hou@gmail.com wrote:
> Hi guys, prepare for a bad question... I want to know how to
pronounce
> "~" and "#" in English

Tilde and Pound sir.



------------------------------

Date: 2 Feb 2005 17:08:03 -0600
From: colin_lyse@98fgfgs.com (colin_lyse)
Subject: can Perl Sort do this, unix sort breaks on it (muliple spaces as demiliter)
Message-Id: <42015ccd$0$96254$45beb828@newscene.com>

runing Sun Unix  5.8 on Sun-Fire-15000 

i have a small file (20k) that looks like the following.  some fields have 1 
space between them, others 2, others more. (. = space)

00290..S.....33.XS798............SUB.......SUB            ACTIVE      19971202
00090..S.... 69KV..TSS30       TR LTC     TR2            ACTIVE      20050201
00135..S.... 69KV..TSS30       TRLTC     TR1            ACTIVE      20050201

the problem is that when i do the following 

sort +2 -3  it works the 3rd the list is correctly sorted in the third column. 
however, if I want to sort on the 4 colum and do

sort +4 -5  it does not work (see example above), it sorts by the 4th column 
only in relation to the 3rd column (x goes first because of the 33), howve i 
think it might be related to the 1 vs. 2 spaces.

I though about replacing the spaces with tabs, however some of the fields have 
spaces within them leading to problems with alignment.  

i also tried 
sort -n -k 5,5 -k 4,4 -k 6,6  but that didn't work only if i stoped after 
field 3

It seems like the problem is that after field 3 there are differing amounts of 
space between fields   .


Can Perl Sort do this, new to perl.  any help greated appreciated.


------------------------------

Date: Thu, 03 Feb 2005 02:13:56 +0100
From: Tore Aursand <toreau@gmail.com>
Subject: Re: can Perl Sort do this, unix sort breaks on it (muliple spaces as demiliter)
Message-Id: <iVeMd.7056$Sl3.170690@news4.e.nsc.no>

colin_lyse wrote:
> [...]
> Can Perl Sort do this, new to perl.  any help greated appreciated.

Yes, Perl can help you;

   perldoc -f sort
   perldoc -q sort


-- 
Tore Aursand <tore@aursand.no>
"I know not with what weapons World War 3 will be fought, but World War
  4 will be fought with sticks and stones." (Albert Einstein)


------------------------------

Date: 3 Feb 2005 02:13:07 GMT
From: Eric Bohlman <ebohlman@omsdev.com>
Subject: Re: capturing perl forks
Message-Id: <Xns95F1CEF0D623Aebohlmanomsdevcom@130.133.1.4>

Arndt Jonasson <do-not-use@invalid.net> wrote in
news:yzd7jls7jn0.fsf@invalid.net: 

> It seems that lately, the correlation between context-less answers and
> the post coming from groups.google.com is near 100%. I haven't tried
> groups.google.com myself, so I don't know how hard it is to make a
> proper posting with it, but it seems obvious to me that it is
> misleading people into breaking long-standing and natural traditions
> of posting.

I'm guessing that it was related to Google's recent switch to a new 
interface which shows more context than the old interface.  The result is 
probably that the people who think of newsgroups as "Google groups" rather 
than as part of Usenet are assuming that everyone else is seeing the same 
context they are.  Or it's possible that the interface doesn't make the 
distinction between posting a followup and a new article clear.


------------------------------

Date: Thu, 03 Feb 2005 01:36:50 GMT
From: <joe_Lucy1107354790266560xd4bad4@example.com> ordinary average guy
Subject: Fork, processes and exit codes?
Message-Id: <Lucy1107354790266560xd4bad4@air.tunestar.net>

Hello newsgroup:

I'm wondering about background processes and OSX.

I'm using a variant of the fairly standard child reaper:

sub REAPER {
        my $chld;
        do {
                $chld = waitpid(-1,&WNOHANG);
                if($PROCS{$chld}){
                        my($obj) = delete($PROCS{$chld});
                        $obj->completed($?);
                }
        } until($chld == -1);
        $SIG{CHLD} = \&REAPER;  # Re-install.
}
$SIG{CHLD} = \&REAPER;

Where %PROCS contains a mapping of pid <=> object. 

The $obj->completed($?) method runs a callback function, (typically a bit
of code to update a status bar that the program terminated with xyz, this 
status message, the ability to track the PID for killing/stopping/etc, 
and backgrounding perl subs, is the whole reason for doing it this way 
instead of system("cmd &"))

All works so far, but.. if I run programs _after_ a process terminates, in the
parent process with system(), the error code returned from those programs is
really messed up:

$proc->run(\$alert_callback); # Does fork, sets $PROCS{$$} = $obj;
 ....
 ... &$alert_callback is run, indicated process is complete.
 ...
 ... Ok, so now there aren't any background processes running.
 ...
system("ls");
($? >> 8) # Returns 161214215
		  # I don't have the actual number handy, but it's a long one.

I've got $SIG{PIPE} and $SIG{INT} handlers installed for other reasons.. 
could this be messsing things up?

Do I need to do something in &REAPER to call perl's built in CHLD handler,
if %PROCS doesn't contain my PID? 

--
http://www.geniegate.com                    Custom web programming
guhzo_42@lnubb.pbz (rot13)                User Management Solutions


------------------------------

Date: Wed, 02 Feb 2005 23:03:56 -0500
From: Wes Groleau <groleau+news@freeshell.org>
Subject: Re: Free perl obfuscation service
Message-Id: <36dm52F526k69U1@individual.net>

Liraz.Siri@gmail.com wrote:
> So I turned my obfuscator program into a web service anybody can use
> for free:
> 
> http://liraz.org/obfus.html

Cool.  I always thought being able to understand my own code
meant I was doing something wrong.

Or is this a way to steal my ideas?  :-)

Here's another perl obfuscation technique:
Translate it into awk, then use a2p.

-- 
Wes Groleau

    Trying to be happy is like trying to build a machine for which
    the only specification is that it should run noiselessly.
                               -- unknown


------------------------------

Date: Thu, 03 Feb 2005 06:53:31 GMT
From: "David" <dz_ny@hotmail.com>
Subject: How to stop print newline with autoflush handle on?
Message-Id: <LTjMd.101342$kq2.55940@twister.nyc.rr.com>

use strict;
use warnings;

$| = 1;

for ( 1 .. 5 )
{
 print ".";
 sleep 1;
}

the code prints:
 .
 .
 .
 .
 .

without $| , it will print out: ..... How can I get the behavior of $|
without the newline?
Thanks for the help.

David




------------------------------

Date: Thu, 03 Feb 2005 08:11:02 +0100
From: pjacklam@online.no (Peter J. Acklam)
Subject: Re: How to stop print newline with autoflush handle on?
Message-Id: <u0ouw22h.fsf@online.no>

"David" <dz_ny@hotmail.com> wrote:

> use strict;
> use warnings;
>
> $| = 1;
>
> for ( 1 .. 5 )
> {
>  print ".";
>  sleep 1;
> }
>
> the code prints:
> .
> .
> .
> .
> .

Well, it shouldn't, if the above is all your code.  All the dots
should be printed on the same line.  And they are, on my computer.
I am using Cygwin on Win2K.  You are using ActivePerl on Windows?

Peter

-- 
#!/local/bin/perl5 -wp -*- mode: cperl; coding: iso-8859-1; -*-
# matlab comment stripper (strips comments from Matlab m-files)
s/^((?:(?:[])}\w.]'+|[^'%])+|'[^'\n]*(?:''[^'\n]*)*')*).*/$1/x;


------------------------------

Date: Thu, 03 Feb 2005 07:16:30 GMT
From: "David" <dz_ny@hotmail.com>
Subject: Re: How to stop print newline with autoflush handle on?
Message-Id: <idkMd.101343$kq2.71987@twister.nyc.rr.com>

Yes, I'm using Active perl on Windows XP Pro.

"Peter J. Acklam" <pjacklam@online.no> wrote in message
news:u0ouw22h.fsf@online.no...
> "David" <dz_ny@hotmail.com> wrote:
>
> > use strict;
> > use warnings;
> >
> > $| = 1;
> >
> > for ( 1 .. 5 )
> > {
> >  print ".";
> >  sleep 1;
> > }
> >
> > the code prints:
> > .
> > .
> > .
> > .
> > .
>
> Well, it shouldn't, if the above is all your code.  All the dots
> should be printed on the same line.  And they are, on my computer.
> I am using Cygwin on Win2K.  You are using ActivePerl on Windows?
>
> Peter
>
> -- 
> #!/local/bin/perl5 -wp -*- mode: cperl; coding: iso-8859-1; -*-
> # matlab comment stripper (strips comments from Matlab m-files)
> s/^((?:(?:[])}\w.]'+|[^'%])+|'[^'\n]*(?:''[^'\n]*)*')*).*/$1/x;




------------------------------

Date: Thu, 03 Feb 2005 08:28:56 +0100
From: pjacklam@online.no (Peter J. Acklam)
Subject: Re: How to stop print newline with autoflush handle on?
Message-Id: <oef2w18n.fsf@online.no>

"David" <dz_ny@hotmail.com> wrote:

> Yes, I'm using Active perl on Windows XP Pro.

It seems like a bug to me.  Or perhaps something with the shell.
I don't see how you make perl get around this.

Peter

-- 
#!/local/bin/perl5 -wp -*- mode: cperl; coding: iso-8859-1; -*-
# matlab comment stripper (strips comments from Matlab m-files)
s/^((?:(?:[])}\w.]'+|[^'%])+|'[^'\n]*(?:''[^'\n]*)*')*).*/$1/x;


------------------------------

Date: 2 Feb 2005 16:27:46 -0800
From: asdfq213rr23we@yahoo.com
Subject: Re: perl quick date convert
Message-Id: <1107390466.895960.248200@o13g2000cwo.googlegroups.com>

Thanks all! Good question, I needed this to convert the date to rss
format..



------------------------------

Date: Wed, 2 Feb 2005 22:56:08 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: perl quick date convert
Message-Id: <slrnd03bn8.1k0.tadmc@magna.augustmail.com>

asdfq213rr23we@yahoo.com <asdfq213rr23we@yahoo.com> wrote:

> Thanks all! 


For what?


> Good question, 


What was?


> I needed this 


What "this" is that?


> to convert the date to rss
> format..


Please include some context in followups like everyone else does.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Wed, 02 Feb 2005 19:09:04 -0500
From: JiggaHertz <none@nospam.com>
Subject: perlgtk embed window
Message-Id: <NdOdnQuA_ZgR8ZzfRVn-rA@comcast.com>

I'm trying to reparent an external window into a perlgtk script.  I
create an xterm and the result I get from xwininfo is.

xwininfo: Window id: 0x1c0000e

Running the following script does nothing to the external window, the
same if I create a gtk window.  I've tried this using fluxbox and kde,
same results.  Any help as to what I'm doing wrong would be greatly
appreciated.

Thanks,
JH

#!/usr/bin/perl -w


$rxid = 0x1c0000e;
use Gtk;
use X11::Protocol;
init Gtk;


$window = new Gtk::Window("toplevel");
$button = new Gtk::Button("button");


$window->signal_connect( "delete_event", \&CloseAppWindow );
$button->signal_connect( "clicked", \&CloseAppWindow );
$button->show();


$window->border_width( 15 );
$window->add( $button );
$window->show();


$xid = $window->window->XWINDOW;
print "xid = $xid\n";


$x = new X11::Protocol;
@t = $x->ReparentWindow($xid, $rxid, 0, 0);
foreach $j (@t) {
          print "t = $t[$l++]\n";
}


print "rxid = $rxid\n";
$window->add_embedded_xid($rxid);


main Gtk;


exit( 0 );


------------------------------

Date: Wed, 02 Feb 2005 18:09:39 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: problem with LWS
Message-Id: <J46dnVeJXcEuwJzfRVn-3Q@adelphia.com>

Tanja wrote:

> When I try to use LWP , message is: Internal Server Error
> Why? What I can do it?

That means something is wrong on the *server*, not with LWP.

Have a look at "perldoc -q 500" for tips.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


------------------------------

Date: Thu, 3 Feb 2005 20:25:43 +1300
From: "Tintin" <tintin@invalid.invalid>
Subject: Re:[OT]  a very bad question
Message-Id: <36e1saF4ud6neU1@individual.net>


<leo.hou@gmail.com> wrote in message 
news:1107394580.644080.49610@c13g2000cwb.googlegroups.com...
> Hi guys, prepare for a bad question... I want to know how to pronounce
> "~" and "#" in English

Depends which variance of English you mean.

For some people, it's:

~ = tilde
# = hash 




------------------------------

Date: 2 Feb 2005 16:32:24 -0800
From: asdfq213rr23we@yahoo.com
Subject: sharing perl scripts over domains
Message-Id: <1107390744.446385.274980@g14g2000cwa.googlegroups.com>

Hi

Im running a website with perl and linux redhat on a vps with root
access. I have three different domains tied to this and wants to fiend
a good way of sharing the scripts and libraries (images etc) across the
domains.

Ex:
www.domain1.com/cgi-bin/script.cgi
and
www.domain2.com/cgi-bin/script.cgi

script cgi is physically only stored in one place but pointed to in
both above examples..

Any suggestions appreciated..



------------------------------

Date: Wed, 2 Feb 2005 23:01:17 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: sharing perl scripts over domains
Message-Id: <slrnd03c0t.1k0.tadmc@magna.augustmail.com>

asdfq213rr23we@yahoo.com <asdfq213rr23we@yahoo.com> wrote:

> wants to fiend
> a good way of sharing the scripts and libraries


That sounds ominous. Heh.


> www.domain1.com/cgi-bin/script.cgi
> and
> www.domain2.com/cgi-bin/script.cgi


If script.cgi was written in C or Python or Visual Basic, you
would solve the problem the same way.

Your choice of programming language is irrelevant to solving
the problem you describe.


> Any suggestions appreciated..


Ask in a more appropriate newsgroup such as:

      comp.infosystems.www.authoring.cgi
      comp.infosystems.www.servers.unix


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Thu, 03 Feb 2005 15:13:57 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: sharing perl scripts over domains
Message-Id: <36dq8oF50ergdU1@individual.net>

asdfq213rr23we@yahoo.com wrote:

> Hi
> 
> Im running a website with perl and linux redhat on a vps with root
> access. I have three different domains tied to this and wants to fiend
> a good way of sharing the scripts and libraries (images etc) across the
> domains.
> 
> Ex:
> www.domain1.com/cgi-bin/script.cgi
> and
> www.domain2.com/cgi-bin/script.cgi
> 
> script cgi is physically only stored in one place but pointed to in
> both above examples..
> 
> Any suggestions appreciated..

This question should be in alt.apache.configuration.

Use DocumentRoot & Serveralias in the Apache httpd.conf file.
A live example:

<VirtualHost 64.5.53.79>
    ServerName www.forum.float.com.au
    ServerAlias forum.float.com.au
    ServerAlias forum.ipo-australia.com
    ServerAlias www.forum.ipo-australia.com
    ServerAlias www.ausinvestor.com
    ServerAlias ausinvestor.com
    Options +Indexes
    ServerAdmin webmaster@XXXX.com.au
    DocumentRoot /home/ausXXXX/www
</VirtualHost>

gtoomey


------------------------------

Date: Thu, 03 Feb 2005 17:25:44 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: sharing perl scripts over domains
Message-Id: <36e1voF4vp4udU1@individual.net>

or use symbolic links to share subdirectories between sites

GT


------------------------------

Date: 2 Feb 2005 17:19:24 -0800
From: webmaster@infusedlight.net
Subject: test
Message-Id: <1107393564.650806.118040@g14g2000cwa.googlegroups.com>

test



------------------------------

Date: Thu, 03 Feb 2005 01:58:37 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: test
Message-Id: <Xns95F1D56ED4016asu1cornelledu@127.0.0.1>

webmaster@infusedlight.net wrote in news:1107393564.650806.118040
@g14g2000cwa.googlegroups.com:

> test

Look out! Robin's baaaack!

Please post test messages to the appropriate test newsgroup.

Sinan


------------------------------

Date: 2 Feb 2005 16:51:09 -0800
From: squash@peoriadesignweb.com
Subject: Whitespace mystery?
Message-Id: <1107391869.548181.208690@c13g2000cwb.googlegroups.com>

I have some strings that have trailing whitespaces which this regex is
not matching:

$string =~ s/\s+$//; ## Remove trailing white spaces

I have tried \n and \t but with no luck. What could those whitespaces
be? 

Thx!



------------------------------

Date: 2 Feb 2005 18:02:20 -0800
From: "jl_post@hotmail.com" <jl_post@hotmail.com>
Subject: Re: Whitespace mystery?
Message-Id: <1107393525.409912.234700@f14g2000cwb.googlegroups.com>

squ...@peoriadesignweb.com wrote:
> I have some strings that have trailing whitespaces which
> this regex is not matching:
>
> $string =~ s/\s+$//; ## Remove trailing white spaces
>
> I have tried \n and \t but with no luck. What could those
> whitespaces be?


At this point, we can only guess.

Do us a favor (so that we can help you out).  Put the following code in
your program right before your regexp:

print "   \$string = \"$string\"\n";
print "      $_\n" foreach map ord, split //, $string;

Then give us the output from these two lines.  This will help us figure
out what is contained in your $string variable.  (You may also want to
put those lines AFTER the regular expression as well, and send us that
output too.)



------------------------------

Date: 2 Feb 2005 18:32:03 -0800
From: squash@peoriadesignweb.com
Subject: Re: Whitespace mystery?
Message-Id: <1107397923.558567.172970@f14g2000cwb.googlegroups.com>

Thanks for the quick reply! Here's the output:

$string = "VS1 " 86 83 49 160 (before regex)
$string = "VS1 " 86 83 49 160 (after regex)



------------------------------

Date: 2 Feb 2005 19:01:56 -0800
From: squash@peoriadesignweb.com
Subject: Re: Whitespace mystery?
Message-Id: <1107399716.253060.180880@z14g2000cwz.googlegroups.com>

Thanks, I have figured it out. I added in this line to remove the ASCII
160 characeter for &nbsp:

$string =~ s/\xA0//; ## Remove html &nbsp blank space (A0 hex for 160)
Thx!



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 7728
***************************************


home help back first fref pref prev next nref lref last post