John, thanks for the "perl" approach. Mustn't forget about that!
deb
At 20:59:59, on 01.02.04:
Cracks in my tinfoil beanie
allowed John W. Krahn to seep these bits into my brain:,
> Deb wrote:
> >
> > I want to run a command inside a script. From the shell, her
Please see response, inline:
At 17:26:25, on 12.31.03:
Cracks in my tinfoil beanie
allowed Rob Dixon to seep these bits into my brain:,
>
> Hi Deb.
Hi Rob!
> Perl is trying to expand $2 in your string. Since Perl's $2 is undefined it
> gives you the warning (full marks for
ave been
killed off, but the pid file is still there.
Thanks for the better regexp,
deb
--
o _ _ _
_o /\_ _ \\o (_)\__/o (_)
_< \_ _>(_) (_)/<_\_| \ _|/' \/
(_)>(_) (_)(_) (_)(_)
was it. I should have seen that. Thanks so much
for pointing that out.
deb
--
o _ _ _
_o /\_ _ \\o (_)\__/o (_)
_< \_ _>(_) (_)/<_\_| \ _|/' \/
(_)>(_) (_)(_) (_)(_)' _\o_
(.) or string at test.pl line 2.
root 19460 1 0 Dec 18 ?0:08 /usr/lib/sendmail -bd -q15m
We have sendmail
Thanks for any help,
deb
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Dec 18 ?0:08 /usr/lib/sendmail -bd
-q15m
It seems to be only going as far as dropping off the grep (grep -v),
and never executing the awk '{print $2}'. I've tried this with
the system() call, with the same results.
Please, what am I missing? :-(
deb
--
To unsubscr
d -q15m
--
It seems to be only going as far as dropping off the grep, and not doing the
awk '{print $2}'. I've tried this with the system() call, with the same
results.
What am I missing? :-(
deb
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Hi Rob,
At 18:44:10, on 11.25.03:
Cracks in my tinfoil beanie
allowed Rob Dixon to seep these bits into my brain:,
> Deb wrote:
> >
> > What am I missing?
>
> Hi Deb.
>
> You're missing the hyphen from the character class. The \w class
> is the same as [0-9A-
At 10:17:47, on 11.25.03:
Cracks in my tinfoil beanie
allowed Brian Gerard to seep these bits into my brain:,
> And the clouds parted, and deb said...
> > What am I missing?
>
> Two things:
>
> 1) The regex you're looking for is likely /[-\w]+/, which says "mat
Here's some test code I'm working with:
## begin ##
while ($name = ) {
$name =~ /(\w*)\.*/;
$name{$1}++;
$name =~ /(\w+)/;
print "$& \n";
}
__DATA__
tibor.test.net
mars.test.net
moon-bx-r.test.net
moon-bs-d.test.net
moon-bt-321.test.net
## end ##
This w
is functional, but strict settings complain, right? So what do I
do? I putting "my $opt_h" to initialize the variable, but then that just
overwrites the setting from the commandline, as you might expect.
What should I do to rid myself of the complaint? As far as I can tell, It's
used
Thanks! I "get it" now!
deb
At 21:37:06, on 07.10.03:
Cracks in my tinfoil beanie allowed Rob Dixon to seep these bits into my brain:,
> Deb wrote:
> > Rob, you were very helpful in showing me how the split and join
> > work, but
> > since I wasn't looking t
Please see correction, below:
At 13:14:50, on 07.10.03:
Cracks in my tinfoil beanie allowed deb to seep these bits into my brain:,
> Try this (untested):
> #The variable $fh is not a filehandlie - you need to assign that:
>
> my $fh = "somefile";
>
This line isn
Try this (untested):
#The variable $fh is not a filehandlie - you need to assign that:
my $fh = "somefile";
open (FILE, ">$fh test") || die $!; # Open file for writing
while () {
print FILE "Hello\n";
}
close (FILE);
Some would say you don't need to do the close. Some say you do. I usually
my $tmpline = join ',', @addrs;
$line = $units . " = " . $tmpline . "\n";
This accomplishes the task, but I'm using a lot of temporary variables. Is
there a better way?
Thanks,
deb
At 00:29:16, on 07.10.03:
Cracks in my tinfoil beanie
No problem, Charles. :-) Thanks for responding, though!
deb
At 19:34:15, on 07.09.03:
Cracks in my tinfoil beanie allowed Charles K. Clarkson to seep these bits into my
brain:,
> [snipped code]
>
> Holy Cow!
>
> Deb, I apologize. After reading Rob's answer, I
&g
27;ve used split
a lot, but not join. I appreciate you giving an example.
deb
At 23:47:28, on 07.09.03:
>
> Hi Deb.
>
> Here's the way I'd do it. First check that the line starts with
> 'units' - whitespace - '=' - whitespace and strip it off in one
lso doesn't have to be a space after the comma. Only the comma is necessary.
I can't seem to find the right incantation to replace just those spaces.
HELP! :-)
deb
--
o _
lso doesn't have to be a space after the comma. Only the comma is necessary.
I can't seem to find the right incantation to replace just those spaces.
HELP! :-)
deb
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Cool. I didn't know about the IPC::Open3 module. Will look at it.
Thanks for the pointer!
deb
At 15:04:25, on 06.23.03:
Cracks in my tinfoil beanie allowed John W. Krahn to seep these bits into my brain:,
> Deb wrote:
> >
> > I've got a script which opens a
g.$$";
system("path-to-command >> $log 2>&1");
Is there a way to use a filehandle instead? Seems I'd have to take care of
block and non-blocking I/O. Methinks it may be simpler just to stick with
printing directly to $log and not the FH, LOG.
Any advise is
o-command >> $log 2>&1");
Is there a way to use a filehandle instead? Seems I'd have to take care of
block and non-blocking I/O. Methinks it may be simpler just to stick with
printing directly to $log and not the FH, LOG.
Any advise is welcome!
deb
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I did,
setenv PTKDB_CODE_FONT
"-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1"
This is not equivalent to 9x15, but that's okay, because it looks just fine.
Thanks,
deb
> > I have been using the Devel::ptkdb module on SunOS, which is a really fine
> > too
Jeff Westman <[EMAIL PROTECTED]> had this to say,
> Have you tried exporting PTKDB_CODE_FONT ?
Not really - I should have said that I use tcsh, and environmental variables
take effect immediately...
Thanks for the response, though.
deb
--
To unsubscribe, e-mail: [EMAIL PROTE
debugger, but the font did not change in the code pane.
But, if I run an xterm with "xterm -fn 9x12" the xterm is displayed with
the correct font size.
Has anyone been able to manipulate the font size using this module? If so,
what did you do to change the font size?
Thanks,
deb
Doh, you're sooo right.
Thanks,
d
John W. Krahn <[EMAIL PROTECTED]> had this to say,
> Deb wrote:
> >
> > Wait. Using this construct, I can't seem to get the change to write out to
> > the file, like I can to stdout.
> >
> >
Wait. Using this construct, I can't seem to get the change to write out to
the file, like I can to stdout.
> > while () {
> if ( /^That_Text\s=\s2/ ) {
> $_ .= $addText;
>}else {
> s/^This_Text.*$/That_Text = 2/;
>}
> You don't need the $_ since this is
Kewl! I didn't know you could do that,
$_ .= $sometext;
That's just what I needed. Beats the heck out of the search and replace I was
doing when I didn't need to.
Thanks all!
d
Wags had this to say,
> if ( /^That_Text\s=\s2/ ) {
> $_ .= $addText;
>}els
Hi,
I am modifying a file and replacing a string that I find, which works just
fine. However, sometimes there is already a string there that I don't want to
replace, but instead append something to it.
Here's what I've got so far: (obligatory use statements not included here)
while () {
n the 1st edition even dreamed about including.
(set me back $50, but in the long run should be well worth it)
The only thing left now is to be able to add new key, values to the %Lists
hash, as my program comes across them.
deb
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional com
ntactically how to pull it out of annonymous
hashes, if you *don't* want to use a literal to obtain a key,
$xKey = $hash{'-x'}
to then iterate over the hash to get the value. Yuck.
Still chewing on the bones...
deb
Steve Grazzini <[EMAIL PROTECTED]> had this to
I'm not sure what you're saying. Since this is an anonymous hash assignment,
how do I pull out the $listkey? Do I need to pre-assign it? For example,
I tried this, added to the previous program,
foreach $listname (sort keys %Lists) {
print "$listname:\n";
foreach $key (sort keys %Lists)
s{$listname} = \%hrLists;
to printing out the key, values by $listname?
Thanks,
deb
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Does anyone know of a searchable archive for the [EMAIL PROTECTED] list?
The archives I've located don't seem to be searchable...
Thanks,
d
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
e the info I'm looking for!
G'Day,
deb
Deb sez,
> Thanks for the quick reply...
>
> Okay, I could use Data::Dumper, but what do you mean by empty
> leading field? Am I dense? (probably!)
>
> I don't really want to use D::D module, so what would I do to
> allev
ds are not lettying me tayp; fdsa
right nows.)
Tnx!
Steve Grazzini <[EMAIL PROTECTED]> had this to say,
> Deb <[EMAIL PROTECTED]> writes:
> > Still struggling with multilevel hashes.
>
>=20
> > while () {
> > chomp;
> > ($listname, $field) =3D
Still struggling with multilevel hashes. Below is my code snippet, obligatory
use statments are in effect. I don't understand the error. Line 52 refers
to the line %hrLists assignment -
Where did I go wrong?
Thanks,
deb
while () {
chomp;
($listname, $field) =
Why not use a foreach, test the element, then undef it when found?
Or, use foreach, test the element, if != '0', then push it onto
another array?
David Gilden <[EMAIL PROTECTED]> had this to say,
> Hi,
> I would like to remove elements from an array that are eq to string '0'
> The following d
t;next
> generation" CPAN interface.
Ah! That did the trick.
I didn't know about cpanplus. Will have to look into that when my current
project is complete. Thanks for the tip!
deb
--
Contrary to popular opinion, Unix is user friendly, It just happens to be
very sel
r solve the problem of updating the filelist
information, and work through this.
> Just a couple of thoughts, HTH,
Thanks,
deb
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
There are 010 types of people in the world:
those who understand bin
e () are valid.
The urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/'
Could not fetch authors/id/A/AN/ANDK/CPAN-1.63.tar.gz
Giving up on '/home/deb/.cpan/sources/authors/id/A/AN/ANDK/CPAN-1.63.tar.gz'
Note: Current database in memory was generated on Sun, 20 Oct
I'm no expert, but this sounds like a buffering problem. You might want to
read,
http://perl.plover.com/FAQs/Buffering.html
deb
[EMAIL PROTECTED] <[EMAIL PROTECTED]> had this to say,
> Is there an issue running perl under linux xinetd where xinetd is
> listening for connecti
multilevel
hash, but it's more a matter of getting in more perl practice than I've been
able to have, I think. In other words, keep on trucking...!
Thanks to everyone who offered their expertise.
deb
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
til morning (it's 2315 here, and I've got to get
up in about 5 hours).
I'll post again how it goes.
(Although, I'm still in the same misery as far as the while loop and
creating the hashes. I've really got to work that out too.)
Thanks again,
deb
The secret of the un
(H, this should have been posted, but I don't see it - sorry if this
actually becomes a double-posting...)
Here's the modified script. I made some changes, as suggested, but there
was no change in the output. I've included my entire script. My head is
getting mighty flat from banging it ag
Here's the modified script. I made some changes, as suggested, but there
was no change in the output. I've included my entire script. My head is
getting mighty flat from banging it against the wall. Oh, and I added "use
warnings;" and I haven't got a clue what I need to do to fix those.
I'd
;s probably b/c I didn't explain very
well. I hope I explained more completely in my posting just previous
to this one.
Thanks,
deb
John W. Krahn <[EMAIL PROTECTED]> had this to say,
> Deb wrote:
> >
> > Hi Guys,
> >
> > I have an array in which each element
Okay, I'm still struggling.I just cannot seem to get my mind to
stop, look, and listen. Here's some code I'm working on:
- 8-<
use strict;
my %cmdLine;
my $DBG = 1;
while () {
chomp;
my ($adx, $rest) = (spl
into the above approach - which is probably more
elegant, but difficult for me to see how to do in practice.
deb
R. Joseph Newton <[EMAIL PROTECTED]> had this to say,
> Deb wrote:
>
> > Hi Guys,
> >
> > I have an array in which each element is a line commandline
Thanks, I know how to use split (I think). Since the data comes in
any order, and I have to corellate it, I can't think of a way that split
will fix me up - Maybe I'm missing something. Can you give me an example?
deb
Dan Muey <[EMAIL PROTECTED]> had this to say,
> perldoc
doesn't eq -r, and I shift until I get to -x, say, and use that
for the $x = (shift), how can I be efficient to check again for -r, which I
still haven't found?
Is this making any sense?
Thanks,
deb
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Thanks, everyone. Looks like the approach is to determine how
long I'm willing to wait, then count down from there. I especially
like John's example of using "time".
deb
John W. Krahn <[EMAIL PROTECTED]> had this to say,
>
> Maybe something like this w
forever. I'd rather try for a few minutes, then exit
with some error.
Any pearls of wisdom out there? I could use a boost...
Thanks,
deb
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
tion, Kipp.
deb
Paul <[EMAIL PROTECTED]> had this to say,
>
> --- Deb <[EMAIL PROTECTED]> wrote:
> > Hmmm, that's a useful work-around.
> > I may use it, but I'm really interested in finding out what the
> > correct invocaton of "map EXPR, LIST&quo
Hmmm, that's a useful work-around.
I may use it, but I'm really interested in finding out what the correct
invocaton of "map EXPR, LIST" would be.
Anyone know?
Thanks,
deb
Kipp, James <[EMAIL PROTECTED]> had this to say,
> if you wanted to keep the use warni
n
is that v5.6.1 now requires a syntactically different way of writing this out?
Since it works as expected, and I don't want the complaint to stdout/stderr,
how would I write this such that perl will not complain?
Thanks,
deb
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Paul Johnson <[EMAIL PROTECTED]> had this to say,
>
> Bang "tcgrep" into google and see if that brings you any joy.
Checking it out. Thanks for the reference (I forgot there was something
in
If so, I can go
check it out - I'm always up for a good util...
deb
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
There are 010 types of people in the world:
those that understand binary, and those that don't.
ô¿ô
~
--
To unsu
many thousands.
Run from the commandline takes a long, long time. I even re-niced the
command -10 as root, but it still takes hours.
Would perl be able to optimize the search and grep better than what I am
currently doing?
Ideas, jokes and rants are appreciat
Hello!
From the commandline, what is the output of
% /usr/sbin/sendmail -bv [EMAIL PROTECTED]
on the server which you cannot send anything?
Also useful, would be any error output that was generated... Hard to
say if this is a perl problem or sendmail, or...???
deb
Johnstone, Colin
ions about it, because, as I
said before, I think I understand hashes, just not what it takes to
manipulate them. But I'm too tired right now to form a good question.
I'll give this some thought and then post some questions.
Again, thanks!
deb
#!/usr/local/bin/perl
use st
y
brain.
Any help would probably make my head quit hurting so much!
deb
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
There are 010 types of people in the world:
those that understand binary, and those that don't.
ô¿ô
~
--
they no longer make nice - well, I need to discover
that before issuing the df cmd, methinks. I suppose I could check
the log for error messages, but that is frought with other problems.
Guess I'll need to keep mulling; maybe that ah-ha! moment will come
to me soon...
Thanks,
deb
--
&qu
df, log the error, and complete the rest
of the script. Short of totally re-writing the script (it's not mine,
to begin with), I would like to modify it. It's a simple system command
being used:
system
able to configure it to send plain text.
Thanks,
deb
Meanwhile, David T-G says:
|
| --0lgBsWZvwbEqroRZ
| Content-Type: text/plain; charset=us-ascii
| Content-Disposition: inline
| Content-Transfer-Encoding: quoted-printable
|
| Janek, et al --
|
| =2E..and then Janek Schleicher said...
Answering myself here - found out it was the perl
binary. For some reason the binary compiled for 64-bit
execution would not make this module properly, but
the 32-bit does. Go figure.
Someone else is looking into why this might be the case.
For now, I'm happy to use the 32-bit version.
Meanwhile, =?iso-8859-1?q?Jonathan=20E.=20Paton?= says:
|
| --- Deb <[EMAIL PROTECTED]> wrote:
| > Hello,
|
| Hiya!
:-) Thanks for the swift reply.
| > I installed perl module Text::Reflow on perl v5.6.1 for Solaris.
| >
| > It built fine, but "make test" f
this, and find out wherein lies
the problem. Any and all help would be appreciated, or even
pointers to the appropriate email list(s).
Thanks,
deb
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
anner="forced.html" #if forced backup,
display notice
} else {
$banner="warning.html" #if site wasn't found,
display warning
}
last;
}
}
}
-
#etc.
Any ideas on why this won't run on the other server? (I already made sure
that the LWP module was installed.)
- Deb Thompson
Civil & Environmental Consultants
800-365-2324
www.cecinc.com
Tracking #: E51A87A7A965D511954600508BC28C5A9B439FC9
70 matches
Mail list logo