Another possible cause is the direction of the slashes in this
statement:
print "var url
= '';";
Just a
thought.
-Original Message-From: Peter Eisengrein
Sent: Tuesday, September 19, 2006 5:35 PMTo: 'Dhivya
Arasappa
Not sure but if I had to guess it would be that the double quotes are
interpolating the output. Of course, not sure why this wouldn't also happen in
Linux. My recommendation is try using single quotes instead.
-Original Message-From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTEC
>
> How can I add a path /ccstore/fmcc/triggers/ into @INC path?
>
There are at least two ways I know of. I'd generally use the first one
unless package lib is unavailable on your machine.
use lib '/ccstore/fmcc/triggers/';
--OR--
BEGIN
{
push(@INC,'/ccstore/fmcc/triggers/');
}
__
While the foreach() may be slow, I don't see any way around it if it is
possible that the date codes may change. Can you show some code? People may have
ideas on how to improve performance of what you've already
written.
-Original Message-From:
[EMAIL PROTECTED]
[mailto:[
>
> #!/usr/bin/perl -w
> use strict;
> use warnings;
>
> my %hash = ( "acc12", 1,
> "acc2", 0,
> "acc3", '',
> "una1", 1 );
>
> $hash{acc3} = ();
>
> my $valid="acc1|acc2|acc3";
>
I'd get rid of the pattern matching and put the valid keys in their ow
> push @INC, "$BASE_PATH/scripts/common";
Doesn't this only work within a BEGIN {} block?
___
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> Before I roll my own ARGV parse code I wanted to know if someone had
> some sample code to get me started. I just want to be able to pass
> simple switches that contain one parameter each to my perl
> app.
check out the Getopt module and all it's many variants.
Not sure how to do programmatically, but `df -k` should
do.
-Original Message-From: Arijit Das
[mailto:[EMAIL PROTECTED]Sent: Monday, September 19, 2005
10:45 AMTo: activeperl@listserv.ActiveState.com;
perl-unix-users@listserv.ActiveState.comSubject: [Perl-unix-users]
Fil
Can you install the new version somewhere else and then have two versions?
If so, you should be able to change the shebang appropriately, i.e.:
#!/usr/bin/perl ### old scripts
#!/usr/bin/newperl/perl ### new scripts
> -Original Message-
> From: nobody [mailto:[EMAIL PROTECTED
>
> No I don't have any control of the subroutine because
> thatz inside a module called Quota
>
Can you fork it off to a child process and have the parent kill it if it has
exceeded a timeout threshold? Don't know if this would work or not, just a
thought.
_
> Select packages you wish to process : all
> Using as the package base directory
The problem appears to be that it was installed in /usr/local which is not
included in @INC. Were you able to choose it's root directory or was this
one chosen for you?
> #!/usr/bin/perl -w
>
> # created by O
> I think this is what you're trying to do
>
> But I'm not sure why? I'd only do this if you are
> expecting to have multiple configs for dbhost, e.g.
> devdb1, devdb2, devdb3... otherwise I'm not sure why
> you'd break down the structure this much...
>
Agreed. Also, by building it in a hard
Try changing your 'quotes' to "double quotes" in the open.
> -Original Message-
> From: Humberto Rodriguez [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 14, 2005 12:27 AM
> To: perl-unix-users@listserv.ActiveState.com
> Subject: [Perl-unix-users] Accessing mail from the web
>
>
> Dea
Title: RE: [Perl-unix-users] RTF to text
There are quite a few modules that match RTF+Text:
http://search.cpan.org/search?query=RTF+Text&mode=module
I'd think at least one or two will do what you want.
> -Original Message-
> From: Sandeep Deshpande [mailto:[EMAIL PROTECTED]]
> Sen
Title: RE: [Perl-unix-users] conversion between exponential and corresponding integer value
depending on the format of the exponential value, it may be as simple as:
print int(10e5);
print int(-10e5);
This doesn't appear to work, though, if formatted as 10e-5, so you'd need to create a sub
Title: RE: Portable solution for modifying date
C:\>perldoc -f utime
utime LIST
Changes the access and modification times on each file of a list
of files. The first two elements of the list must be the
NUMERICAL access and modification times, in that ord
Title: RE: [Perl-unix-users] Index of array element
are the names unique? If so, a hash would be faster. Nevertheless, I'd do something like
my $index;
my @names = qw(Bob Mary Fred Julio);
my $matchthis = "Fred";
for (my $i = 0; $i < scalar(@names); $i++)
{
if ($names[$i] eq $mat
Title: RE: [Perl-unix-users] Removing files older than 10 days from a directory
### untested
my $dir = '/dir';
opendir(DIR,$dir) || die "Can't open $dir : $!\n";
my @files = readdir(DIR); # you may want to grep only certain files here
close(DIR);
foreach my $file(@files)
{
my $now
Check out the File::Copy module. That will do what you want. Also, the
stat() function will give you the file parameters, including
size.
-Original Message-From: Mario Ortiz
[mailto:[EMAIL PROTECTED]Sent: Monday, July 14, 2003 12:22
PMTo: [EMAIL PROTECTED]Subject:
[Perl-uni
definitely. What you want is a hash. It would look like
this:
###
my %animalandfood = (
'cat' => 'meow mix',
'dog' => 'dog chow',
'ferret' => 'ferret food',
'mouse' => 'cheese' ### changed this one on
ya!
);
foreach my $animal (keys %animalandfood)
{
print "an
perldoc -q contains
-Original Message-
From: EXTERN Chakirov Timour (TZ CIS; DS/ESQ3)
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 10:38 AM
To: '[EMAIL PROTECTED]'
Subject: [Perl-unix-users] "in" operator?
Hello,
I know it's a dummy question, however I could not find a quick
> How would I go about to set for example a timeout setting for how long
> the script should wait for a response, and is it possible to do more
> than one DNS query at the time? Any suggestions and/or ideas would be
> very much appriciated.
A couple thoughts:
1- are there other nameservers that
Is it possible that PE-456-987 may be pe-456-987 or Pe-456-987 or
pE-456-987? If so, then your match would need to be
if ($cedula =~ /$linea[2]/i)
-Original Message-
From: Ing. Ricardo Cumberbatch L. (PANNet - URC)
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 18, 2003 9:51 AM
To: [
http://www.cpan.org
http://search.cpan.org
-Original Message-
From: Poon, Kelvin (Infomart) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 9:39 AM
To: 'Thomas_M'
Cc: '[EMAIL PROTECTED]'
Subject: RE: [Perl-unix-users] Perl and UNix
Thanks a lot for all anyone who replied, th
Title: RE: [Perl-unix-users] how to get a directorylisting
opendir(DIR,$directory) || warn "Can't open $directory : $!\n";
my @table = readdir(DIR);
close(DIR);
-Original Message-
From: Pasi Valkeila [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 17, 2002 14:13
To: [EMAIL PROT
Title: RE: [Perl-unix-users] Setting env variables?
easy enough to test...
#script1.pl
$ENV{Ice_Cream}{Flavors}{Favorite}="Chocolate";
#script2.pl
require "script1.pl";
print "$ENV{Ice_Cream}{Flavors}{Favorite}\n";
> -Original Message-
> From: Craig Sharp [mailto:[EMAIL PROTECT
Title: RE: [Perl-unix-users] need some help in pattern matching
### UNTESTED
my $line = 'DNFAR1S query tli tcp /dev/tcp \x00020bb8a9f3702f';
my @chunks = split(/\ /,$line);
# get the first 5 vars from @chunks
my ($v5,$h6,$ip1,$ip2,$ip3,$ip4) = $line =~ /^.(\w{4})(\w{4})(\
Title: RE: [Perl-unix-users] Help please with a search routine
I copy/pasted your first attempt
$field[3] ="hello how are you today";
$FORM{'keyword'}="today";
if ($field[3] =~/$FORM{'keyword'}/i) {$found="1";}
and it worked for me. You may want to add a couple of print statements before
e a chance that it could match more than one?
If so, how do you want to handle it? Only write to the first file? Or write to
each file for each match?
-Original Message-From: AITHA, BHEEMSEN (SBCSI)
[mailto:[EMAIL PROTECTED]]Sent: Tuesday, April 02, 2002
17:38To: 'Peter Eisengr
t OUT2 "$data" if ($f == 2);
print OUT3 "$data" if ($f == 3);
}
-Original Message-
From: AITHA, BHEEMSEN (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 14:30
To: 'Peter Eisengrein'; [EMAIL PROTECTED]
Subject: RE: Create three diff
Title: RE: [Perl-unix-users] search for a particular string in a file
assuming old files do not change, it would be easiest to keep a hash of already scanned files. Then upon each execution (or every x intervals if it is running as a daemon), you readdir(), and compare that against your hash.
you mean vars other than what is in %ENV ?
> -Original Message-
> From: Craig Sharp [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 16, 2002 15:20
> To: [EMAIL PROTECTED]
> Subject: [Perl-unix-users] Setting variables with a module
>
>
> Hello,
>
>
>
> I would like to be able t
First of all, if this server is available on the 'net, it's a bad idea -
don't do it. If it is only accessable to your internal network, you have
less to worry about but you probably still do not want just anyone able to
add/change users.
That being said, you have a few options (I'd go with #3):
You don't even need the s/// since you need to test for it anyway. You could
do it something like this:
@lines =('before match',
') in psfs1 extent size 40 next size 10 lock mode
row;',
'after match');
foreach (@lines)
{
if ($_ eq ') in ps
NAME lib - manipulate @INC at compile
time
SYNOPSIS use lib
LIST;
no lib
LIST;
DESCRIPTION This is a small simple module which
simplifies the manipulation of @INC at compile
time.
It is typically used to add extra directories to
perl's search path so
print scalar(localtime());
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: 17 September 2001 15:43
> To: [EMAIL PROTECTED]
> Subject: [Perl-unix-users] Log
>
>
> I'm trying to output the date and time a perl script is run to a log.
> What is the synt
That's pretty much it. But in your example, you could also just do a foreach
() instead of reading the entire FILE into @SOMEVAR. That should help
too.
-Pete
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 04 September 2001 02:13
> To: Erick Nelson; per
MRTG! It can graph any snmp device. And it's perl (and C) and available on
UNIX and Win platforms. You can find it at
http://people.ee.ethz.ch/~oetiker/webtools/mrtg/mrtg.html -- check out some
of the user pages to see what can be done with it.
-Pete
> -Original Message-
> From: Alex
use Time::Local;
With this you can convert it to epoch time which then becomes a simple
numeric comparison.
-Original Message-
From: Dennis Smith [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 11:36 AM
To: [EMAIL PROTECTED]
Subject: [Perl-unix-users] Compare timestamp using
There may be a better way, but this should work (untested):
open(FILE,"$thefile") || die "Can't open $thefile: $!\n";
@file=;
close(FILE);
$lastline=pop(@file);
-Original Message-
From: Ricardo Cumberbatch L. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 15, 2001 9:24 AM
To: Perl
Not sure Perl is going to override the systems permissions (nor do I think
you'd really want it to). I think your options are two:
[1] system("su -c inndstart news"); ### or
[2] run the script from the news' crontab
-Original Message-
From: Martin Moss [mailto:[EMAIL PROTECTED]]
Sent:
41 matches
Mail list logo