On Jun 5, 2013, at 4:18, "Nemana, Satya" wrote:
> Hi
>
> I am having a slight difficulty in getting this accomplished.
> When my perl program keeps running, I sometimes need to pause the screen
> output and check some things on the output.
> But, I want my program to still keep running whil
I'm trying to learn to develop Perl modules in an effort to have clean
directory structure and more reusable code.
I'm hitting a little snag in my test code that I don't quite understand. I'm
hoping someone can help explain where I may be going wrong here.
The error I'm receiving is this:
ln0
Is there such a thing?
I'm trying to take a HoH and make a reference to a sub-part of the hash.
This doesn't work:
my %sub_hash = $main_hash{'sub_hash'};
I get the following error:
Reference found where even-sized list expected at ./my_buggy_program line 30.
Any quick tips on how to refer
I know there have probably been a thousand posts on this topic, and I apologize
in advance for skipping over them and deleting them.
I have instances of strange characters in logs, and I'd like to be able to
print them properly.
Here's an example of a few lines:
L 06/27/2008 - 18:37:18: "[P
I want to be able to tag a module with one or more tags that can be tested for
after requiring it.
require 'module';
Any ideas on the best way to accomplish this?
Thanks in advance
"Chas. Owens" <[EMAIL PROTECTED]> wrote:
No, environmental variables are a per-process thing. Child processes
inherit the state of their parent's environment, but that is it. If
you need inter-process communication you have to use IPC*, a file, a
database, or some other external resource. Take
I have an application that executes a user-defined script. The application sets
certain environment variables that the script uses to determine which phase it
is in.
I want to be able to set other env variables to set other conditions usable
by the script.
Is there a way to do this?
I need to make strings of variable length for testing inputs.
The strings can contain any letter, say 'a', and I need to be able to create
the string with
255, 256 or any length.
Is there a quick and easy way to do this with perl?
-
Never miss an email
ng $p($proctable{$p})");
kill 9, $p;
}
# set processes = 0 to break the main loop
# and "zero" the process table
$processes = 0;
%proctable = ();
}
Thanks in advance!
- Travis Thornhill
-
Need a quick answer? Get one in
Chad Perrin <[EMAIL PROTECTED]> wrote:On Tue, Dec 26, 2006 at 06:59:42PM
-0800, Travis Thornhill wrote:
>
>
> Adriano Allora wrote: hi to all,
>
> (and a very good new year's eve). someone can tell me why this script
> doesn't accept the -h flag?:
>
Adriano Allora <[EMAIL PROTECTED]> wrote:hi to all,
(and a very good new year's eve). someone can tell me why this script
doesn't accept the -h flag?:
#!/usr/bin/perl -w
use strict;
use warnings;
use Getopt::Std;
getopt('h');
my $opt_h;
if($opt_h)
{
[code...]
}
You need to declare a has
If you're using some flavor of unix, executing 'perldoc perlfork' on the
command line is a good place to get started.
The books Programming Perl, and Perl Cookbook have good information on how to
get rolling with fork.
- Travis
"Dukelow, Don" <[EMAIL PROTECTED]> wrote:
I'm using
rmdir will only delete empty directories. I assume these directories contain
files?
Plus I'm not sure that using system() with die works the way you are
intending. Why not use perl's rmdir (which also only deletes empty dirs). I'd
try opendir on the CVS
directory and unlink all the file
The most common way this is used is to reload edits that you make to a resource
file -- like .profile -- into the current shell.
$> . .profile
or
$> . .bashrc
HTH,
- Travis.
Tommy Nordgren <[EMAIL PROTECTED]> wrote:
On 18 okt 2006, at 22.47, [EMAIL PROTECTED] wrote:
/$progname syntax OK/ ) {
$syntax_ok = 1;
last;
}
}
Travis Thornhill <[EMAIL PROTECTED]> wrote:
Would something like this (with backticks) work?
It's probably not as robust as using 'do BLOCK' but it might
work.
#untested
my $progname = "
Would something like this (with backticks) work?
It's probably not as robust as using 'do BLOCK' but it might
work.
#untested
my $progname = "whatever.pl";
my $output = `perl -c $progname`;
if ( $output =~ /$progname syntax OK/ ) {
# It's good
} else {
# It's bad
}
I was just looking into the %ENV hash in my trusty Programming Perl book
and found this interesting note on p. 661:
"Note that processes running as crontab(5) entries inherit a particularly
impoverished set of environment variables. (If your program runs fine from the
command line but not u
with warm regards,
Venkat Saranathan
Gulf Breeze Software
www.gulfsoft.com
GulfBreeze Blog
www.gulfsoft.com/blog
-Original Message-
From: Travis Thornhill [mailto:[EMAIL PROTECTED]
Sent: Friday, July 21, 2006 11:47 PM
To: beginners@perl.org
Subject: fork question
I thought I understood
Does anyone have any idea why setting $ENV{"PATH"} = "" would cause
the open() function to fail? The file I'm trying to open exists, and some
debug
printing shows that I'm in the directory where it exists.
Travis.
-
Do you Yahoo!?
Everyo
I thought I understood this but maybe I don't.
When perl forks it creates an exact copy of itself with open files, same
variables,
hashes, arrays, etc.
But when a variable in one changes, do they all change?
What's wrong with how I'm trying to use the $children variable to track
I've heard that there is a way to make cscope work for perl.
I can't find any info in the cscope man page or in perldocs.
Can anyone point me in the right direction?
Thanks in advance
-
Do you Yahoo!?
Next-gen email? Have it all with the
21 matches
Mail list logo