comp.lang.perl.misc
  Home FAQ Contact Sign in
comp.lang.perl.misc only
 
Advanced search
January 2008
motuwethfrsasuw
 123456 1
78910111213 2
14151617181920 3
21222324252627 4
28293031    5
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.perl.misc Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  FAQ 8.1 How do I find out which operating system I'm running under?         


Author: PerlFAQ Server
Date: Jan 18, 2008 18:03

This is an excerpt from the latest version perlfaq8.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

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

8.1: How do I find out which operating system I'm running under?

The $^O variable ($OSNAME if you use English) contains an indication of
the name of the operating system (not its release number) that your perl
binary was built for.

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

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.
Show full article (1.22Kb)
no comments
  Can't Install Perl as Non-Root         


Author: dawmail333
Date: Jan 18, 2008 15:44

Hi!

I was trying to install a personal version of Perl to my own user
folder. I am running on a remote webserver that uses Apache. I have
succeeded with the following steps:

wget http://perl.com/CPAN/src/stable.tar.gz
tar zvxf stable.tar.gz
cd perl-5.8.8
sh Configure -de -Dprefix=/home/.bazooka/dawliam/perl/

This is the line I encounter problems on:
make && make test && make install

This is the 'dump':
Extracting find2perl (with variable substitutions)

make[1]: Leaving directory `/home/.bazooka/dawliam/perl-5.8.8/x2p'

Making B (dynamic)
opendir(./../../../../..): Permission denied at ../../lib/File/Find.pm
line 604
Use of chdir('') or chdir(undef) as chdir() is deprecated at ../../lib/
File/Find
.pm line 751...
Show full article (1.58Kb)
9 Comments
  perl -pe substitution         


Author: Asim Suter
Date: Jan 18, 2008 14:43

Case 1)

my $VAR = 'ABC@VERSION@DEF' ;

$VAR =~ s/\@VERSION\@/1.2.3.4/g ;

print "<$VAR>\n" ;

Prints <ABC1.2.3.4DEF> as expected.

=========================

Case 2)

Lets say $input_file has a line containing ABC@VERSION@DEF

And I want to replace @VERSION@ by 1.2.3.4 So I do:

`perl -pe 's/\@VERSION\@/1.2.3.4/g' -i $input_file` ;

Which chnages the content in $input_file to

ABC1.2.3.4VERSION1.2.3.4DEF

Why the difference in the two cases ?

What do I need to do to get bahavior like Case 1 in Case 2 ?

I'd suspect some special interpretation of @ at play but it's escaped - but
not sure any ideas ?

Thanks!
1 Comment
  FAQ 8.24 Why can't I get the output of a command with system()?         


Author: PerlFAQ Server
Date: Jan 18, 2008 12:03

This is an excerpt from the latest version perlfaq8.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

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

8.24: Why can't I get the output of a command with system()?

You're confusing the purpose of system() and backticks (``). system()
runs a command and returns exit status information (as a 16 bit value:
the low 7 bits are the signal the process died from, if any, and the
high 8 bits are the actual exit value). Backticks (``) run a command and
return what it sent to STDOUT.

$exit_status = system("mail-users");
$output_string = `ls`;

--------------------------------------------------------------------
Show full article (1.45Kb)
no comments
  AuthDBI log out is it possible         


Author: joe
Date: Jan 18, 2008 10:24

Hello I am using AuthDBI in my apache server, is there a way to code a
log out button? thanks.
3 Comments
  how to put subroutines in separate files and call?         


Author: birdsong9
Date: Jan 18, 2008 09:44

I'm a novice perl programmer but have been thinking about this
question for a long time and finally decided to see if I could get
some advice... I have a program that is several thousand lines of
code, mostly broken up into dozens of subroutines, and if it's
possible to do so would like to be able to call a subroutine that is
stored in a separate file location and have it share data back and
forth with my program. Is it possible to do this without creating
modules?

Any assistance would be greatly appreciated.
6 Comments
  Client Program not Receiving Message from Server         


Author: deadpickle
Date: Jan 18, 2008 09:27

My chat client/server program does not seem to be receiving messages.
It utilizes a Glib::Timeout to loop a sub named wait_for_msg that
listen for the server to send the message so that it can be received
and displayed in the Textview widget. The program connects to the
server fine, logs in great. When the user types in the entry box and
hits send, the program sends the entered message to the server and it
is then sent to all clients including the author of the message. The
problem is that the client is not receiving the message from the
server; I suspect it is the timer. I tried printing text in the loop
to see if it was still running but it only printed once which could
mean that it has stopped working. Any ideas on how to remedy this
problem?
Show full article (8.37Kb)
1 Comment
  Free and latest softwares         


Author: bajagu
Date: Jan 18, 2008 06:43

Hiiii,

Free download latest softwares........... Hurrryyy upp!!!!!!!!

http://freesoftwaredownloaded.blogspot.com/

http://freedownload.co.in
no comments
  Pipe input over several scripts         


Author: spoertsch
Date: Jan 18, 2008 06:35

Hi,

I'm executing a script with an IPC::open2 call and pipe some input
parameter in it. So that works fine. That script uses some of the
input paramter and has to pipe the rest to another script that is
started by that script. And that is the part where it doesn't work
anymore. The last script is startet using a system() call:

scriptA starts scriptB with open2
scriptB starts scriptC with system
scriptA passes input for scriptB and scriptC to scriptB
How to pass the input from scriptB to scriptC?

The whole thing is needed to achieve an automation for an installation
process which has several scripts. The problem is that i cant change
too much on scriptB, because it should still work for a manual
installation.
Normally scriptB and scriptC ask for some input on stdin and now i
have to pass the predefined input to those scripts for the automation
without changing the manual installation.

Thanks
spoertsch
3 Comments
  FAQ 8.12 How do I start a process in the background?         


Author: PerlFAQ Server
Date: Jan 18, 2008 06:03

This is an excerpt from the latest version perlfaq8.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

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

8.12: How do I start a process in the background?

Several modules can start other processes that do not block your Perl
program. You can use IPC::Open3, Parallel::Jobs, IPC::Run, and some of
the POE modules. See CPAN for more details.

You could also use

system("cmd &")

or you could use fork as documented in "fork" in perlfunc, with further
examples in perlipc. Some things to be aware of, if you're on a
Unix-like system:
Show full article (3.05Kb)
no comments
1 2