ring. I also
thought that I had to put in the '\s' space delimiter, but just now running
them without the two occurrences of '\s' doesn't make any difference. Hmm, more
to study...
Thank you again for your suggestion, and for teaching me more perl.
-Kevin Zembower
>&
in
>>> Manav Mathur <[EMAIL PROTECTED]> 08/17/05 05:08PM >>>
- Original Message -
From: "KEVIN ZEMBOWER" <[EMAIL PROTECTED]>
To:
Sent: Thursday, August 18, 2005 1:06 AM
Subject: Finding matches and use of __END__ in a one-liner
I have a series of
; }"
$x; }
done
>main:/var/qmail/alias#
>
>Any suggestions on the mistakes I've made?
>
>Thanks a lot for your advice and suggestions.
>
>-Kevin Zembower
The end block is specified as
END{} and not __END__{}
also, change
print [EMAIL PROTECTED]
to
print [EMAIL PROTEC
int [EMAIL PROTECTED]; }" $x;
} done
main:/var/qmail/alias#
Any suggestions on the mistakes I've made?
Thanks a lot for your advice and suggestions.
-Kevin Zembower
-----
E. Kevin Zembower
Internet Systems Group manager
Johns Hopkins University
Bloomberg School of Public Health
Cente
Can I use a perl one-liner and the module HTML::Entities to decode a string
like this from the command line?:
select%7Bsp%7D*%7Bsp%7Dfrom%7Bsp%7Dcore_links
It's the beginning of a very long SQL statement.
I tried these variations, to no avail:
506 echo select%7Bsp%7D*%7Bsp%7Dfrom%7Bsp%7Dcor
John, thanks for your thoughts.
The foreach loops through a list of authors. The input file has multiple
authors separated by a '|' in a single 'author' field. I want to put each
author into a table, and link authors to articles with a 'join' table of author
ids and article ids. I thought that
're suggesting I look at fetchrow_array(). Am I overlooking something that
you're aware of?
Thanks, again, for your help.
-Kevin
>>> "Philip M. Gollucci" <[EMAIL PROTECTED]> 05/05/05 03:38PM >>>
KEVIN ZEMBOWER wrote:
>I'm using a func
-Kevin
>>> "Philip M. Gollucci" <[EMAIL PROTECTED]> 05/05/05 03:38PM >>>
KEVIN ZEMBOWER wrote:
>I'm using a function from DBI that needs a hash reference according to the
>documentation, and I don't know how to turn $_ into one. The section of
s an
easy question for someone who knows what they're doing, but I can't find it.
Thanks for your thoughts and suggestions.
-Kevin Zembower
-
E. Kevin Zembower
Internet Systems Group manager
Johns Hopkins University
Bloomberg School of Public Health
Center for Communication
;s not the overriding concern.
Any recommendations on which module to pick?
Thank you for your advice and suggestions.
-Kevin
-
E. Kevin Zembower
Internet Systems Group manager
Johns Hopkins University
Bloomberg School of Public Health
Center for Communications Programs
111 Market Place, Suite 31
>>> Offer Kaye <[EMAIL PROTECTED]> 03/28/05 12:17PM >>>
On Mon, 28 Mar 2005 11:13:05 -0500, KEVIN ZEMBOWER wrote:
> I'm trying to read in text lines from a file that look like this:
[...snip...]
As others have said, you really should use a module. For completness,
here&
, but that the last two
incorrectly assigned $cost to part of the title.
Can anyone help me write a match which would parse all of these lines
correctly? Extra bonus points for explaining it throughly, so I don't have to
ask this question here again. If it's easier to just filter or substitute in
the original input file, what should I do?
Thank you all in advance for your help and suggestions.
-Kevin Zembower
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Hope this is a good place to ask beginner CPAN questions.
Seemingly just recently, I've begun getting errors like this while installing
CPAN modules:
www:~# perl -MCPAN -e 'install Bundle::Slash'
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
ftp://mirrors.kernel.org/pub/CPAN/authors/id/C
Matthew and Edward, thank you. Both of those two sources are excellent, and I
didn't know of either. -Kevin
>>> "Shaw, Matthew" <[EMAIL PROTECTED]> 12/09/04 09:21AM >>>
perldoc perlpod is pretty comprehensive. Have you checked that out?
-Original Me
, but didn't give a unified
example. Suggestions?
Thanks for your thoughts.
-Kevin Zembower
-
E. Kevin Zembower
Internet Systems Group manager
Johns Hopkins University
Bloomberg School of Public Health
Center for Communications Programs
111 Market Place, Suite 310
Baltimore, MD 21202
41
>>> Wiggins d Anconia <[EMAIL PROTECTED]> 09/29/04 12:08PM >>>
If possible you should consider using a CSV formatting module, this will
translate best into Access (which you should avoid completely if
possible). Text::CSV or even DBI/D::CSV are excellent. These modules
will allow you to setup you
CPAN on 'encoding' but that didn't seem to be the right term.
Thanks for your help and advice.
-Kevin
-
E. Kevin Zembower
Internet Systems Group manager
Johns Hopkins University
Bloomberg School of Public Health
Center for Communications Programs
111 Market Place, Suite 310
Bal
minutes to just seconds.
Thank you again for all your help.
-Kevin Zembower
=
[EMAIL PROTECTED]:/opt/analog/logdata/db$ cat listqueries3.pl
#!/usr/bin/perl
use warnings;
use strict;
my $debug = 1;
while (<>) {
next if /^#/; #Skip it if it&
John, thank you so much for your generous gift of going throughout my program and
making suggestions. As I typed in your suggestions, I tried to make sense of what you
were proposing, and most of the time I clearly understood it.
I'm still having trouble with the regex expression. I've pasted in
een working on this, on and off, the last two days. Any suggestions or pointing
out my boneheaded errors is gratefully appreciated. Any other overall suggestions on
my coding are welcomed. This script seems to run very slowly, due probably to all the
complex regex.
Thanks for all your help and sugge
keywords for what's going on, I could search for
it. I tried searching the archives of this list for "ASCII" but didn't get anything
pertaining to this problem.
Thanks for all your help and suggestions.
-Kevin Zembower
-
E. Kevin Zembower
Unix Administrator
J
a single element. The
following would be well-formed XML.
PIP 189165
Hello, world!
Rob
-Original Message-
From: KEVIN ZEMBOWER [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 03, 2004 12:41 PM
To: [EMAIL PROTECTED]
Subject: XML::Writer beginner problems
Hope it's okay to
1,
DATA_INDENT => 3);
I get this output:
[EMAIL PROTECTED]:~/POPLINE_XML$ ./test.pl
Attempt to insert start tag after close of document element at ./test.pl line 11
PIP 189165[EMAIL PROTECTED]:~/POPLINE_XML$
I don't understand what I'm doing wrong
Thank you all for some first thoughts and clarifying questions.
I'm trying to discard any URL with any character that is not an upper- or lower-case
letter, digit, or the characters $-_.+!*'(), . I realize that some other characters
can be
used in special circumstances, but I don't have to allo
h a backslash or '\Q' but both gave strange errors about
uninitiated strings in concatenations.
Any suggestions? Thanks for your help and thoughts.
-Kevin Zembower
-
E. Kevin Zembower
Unix Administrator
Johns Hopkins University/Center for Communications Programs
111 Market Place, Suite 3
Yep, works. Thanks for showing an alternate way without using the tr/// trick. Now to
go through it character by character to try to understand it...
Thanks, again, Bob.
-Kevin
>>> Bob Showalter <[EMAIL PROTECTED]> 08/14/03 10:39AM >>>
KEVIN ZEMBOWER wrote:
> Here
2 09:54 weatherbug.pl
-rwxr-xr-x1 cactiuse webadmin 791 Jun 12 16:06 weatherbug.pl.orig
-rwxr-xr-x1 cactiuse webadmin 208 Aug 12 10:28 webhits.pl
centernet:/usr/local/httpd/htdocs/cacti8/scripts #
I'm stumped. Can anyone point out the boneheaded mistake I'm making?
Thank
y does the trick. There is
also a utility called fixnl that I use that seems to work too.
Rob
-Original Message-
From: KEVIN ZEMBOWER [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 12, 2003 10:56 AM
To: [EMAIL PROTECTED]
Subject: Can run through perl, but not alone?
I feel so stupid,
Oooh, clever. Thanks. -Kevin
-
E. Kevin Zembower
Unix Administrator
Johns Hopkins University/Center for Communications Programs
111 Market Place, Suite 310
Baltimore, MD 21202
410-659-6139
>>> Jenda Krynicky <[EMAIL PROTECTED]> 08/14/03 09:43 AM >>>
From: KEVIN ZE
Randal, thanks, that's a technique I wouldn't have thought of on my own.
-Kevin
-
E. Kevin Zembower
Unix Administrator
Johns Hopkins University/Center for Communications Programs
111 Market Place, Suite 310
Baltimore, MD 21202
410-659-6139
>>> Randal L. Schwartz <[EMAI
before A
Nave, Paul James
Kennedy, Edward Thomas
Feinstein, Dan # Because E comes before L
Flynt, Larry
(if I did it correctly).
So, what's the most perl-ish way to write such a beast? Bonus points for a one-liner.
-Kevin
-
E. Kevin Zembower
Unix Administrator
Johns Hopk
n reading straight from the CD-ROM. This is a local CD drive, on the host,
and is not using Samba. But, I really appreciate the suggestions on a work-around that
will let me continue to make progress on my project.
Thanks, again.
-Kevin
>>> Rob Dixon <[EMAIL PROTECTED]> 07/2
Bob, boy, is that odd. Thanks for trying it out. Now, I'm really scratching my head.
-Kevin
>>> Bob Showalter <[EMAIL PROTECTED]> 07/25/03 03:03PM >>>
KEVIN ZEMBOWER wrote:
> in name?
>
>
> Thanks, Rob, for your note. I tried this:
> [EMAIL PROT
Thanks, Rob, for your note. I tried this:
[EMAIL PROTECTED]:~/RapheTask$ perl t
/cdrom
/cdrom/JPEG Covers
/cdrom/PDF Docs
[EMAIL PROTECTED]:~/RapheTask$ cat t
use strict;
use warnings;
use File::Find;
find (sub{ print "$File::Find::name\n" }, '/cdrom/' );
[EMAIL PROTECTED]:~/RapheTask$
ry structure is included on the CD, and not just hard-code in
specific directory names used.
Thanks for your thoughts and suggestions.
-Kevin Zembower
-
E. Kevin Zembower
Unix Administrator
Johns Hopkins University/Center for Communications Programs
111 Market Place, Suite 310
Baltimore, MD 21
Wow, thanks, Jenda, I'll experiment with your suggestions tomorrow. Thanks, again.
-Kevin
>>> Jenda Krynicky <[EMAIL PROTECTED]> 07/10/03 04:02PM >>>
From: KEVIN ZEMBOWER <[EMAIL PROTECTED]>
> I'm trying to clean up some data and load it into a databa
if ($datelastmo) {
($MM, $DD, $YY, $hh, $mm, $ss) = $datelastmo =~ m[(..)/(..)/(..) (..):(..):(..)];
$datelastmo = "$YY-$MM-$DD";
} # if there's a datelastmo
So, to help me in the future, why didn't the version with references work, and can it
be corrected to work?
Thanks for your thoughts.
5.8.0' but neither
works. Is this a dumb question because cpan only upgrades modules? If
so, to upgrade perl, do I just download the source, compile and install
it?
Thanks for your help.
-Kevin Zembower
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
s group, where I bet it's been mentioned before.
Extra credit: Is it possible to do this in a one-liner?
Thanks for all your help and suggestions.
-Kevin Zembower
-
E. Kevin Zembower
Unix Administrator
Johns Hopkins University/Center for Communications Programs
111 Market Place, Suite 31
rch only up to the first space character? I
think I can do it by defining a second variable that is just the part of
the record up to the first space, and matching on that. But, is there a
another way, probably using the 'minimizing' quantifiers?
Thanks for your thoughts.
-Kevin Zem
3 seconds later, then
requested third file 1 second after that" I'm trying to determine
from the times between requests and the presence of subsequent files
whether requests are made for a particular file in error.
Would this be most easily done with a perl module, and which on
Method name : VasectomyMethod short name: Vas
Key: 7 Method name : Condoms Method short name: Condoms
Key: 8 Method name : TCu-380A IUD Method short name: TCu
Key: 9 Method name : Spermicides Method short name: Sperm
www:/cire #
Thanks, again.
-Kevin
-
E. Kevin Ze
this is a hash of arrays, with the hash key being the
methodid, and the hash value being an array of methodid, method and
sname.
Thanks, again, for all your help. I'm certain my difficulty in
understanding is due to my abilities, and not your explanations.
-Kevin
>>> "KEVIN ZEMB
David, your revisions made your solution even more clear to me. With
regard to my earlier question of using this in a subroutine, I think I
now see that %thehash would be my persistent repository for methods, and
that I could refer to it just like you did in the last three lines,
without rereading
foreach $key (sort keys %$row_ary) {# '%$' is used to
dereference the
scalar $row_ary to the hash
print"Key:$key Value $$row_ary{$key}\n"; # $$row_ary is
part of the deref
voodoo
}
print"\n";
}
$sth->finish;
$dbh->disco
instance?
Thanks for your help and suggestions. Please let me know if I should
take this question to the DBI-users list.
-Kevin Zembower
-
E. Kevin Zembower
Unix Administrator
Johns Hopkins University/Center for Communications Programs
111 Market Place, Suite 310
Baltimore, MD 21202
410-659-6139
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
t
Performance Engineer
Geodesic Systems
312-832-2010
<http://www.geodesic.com>
<mailto:[EMAIL PROTECTED]>
-Original Message-
From: KEVIN ZEMBOWER [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 29, 2002 10:58 AM
To: [EMAIL PROTECTED]
Subject: Substitution: How do I say ...
... replace every \t (tab character) which is NOT immediately proceeded
by '454354' with ''?
Thanks. I suspect this is any easy one, but I've been staring at it for
an hour, and I can't figure it out. Brain not working well today.
-Kevin Zembower
-
E. Kev
e this more explicit, with a line
like "Either Data, FH or Path must be specified in a message, even if it
is null."
Thanks, again, for writing.
-Kevin
>>> "Jenda Krynicky" <[EMAIL PROTECTED]> 03/26/02 06:10PM >>>
From: "KEVIN ZEMBOW
me error with
"$msg->send;" The program ends at this point, and doesn't proceed with
the code I've written to output some more HTML stuff.
Any yet, oddly enough, the message is sent properly, and I receive it.
Any pointers on what I should look into?
Thanks in advance for all y
Thank you, David, Jenda and Kate for explaining this so clearly. I would
have had trouble understanding this on my own. Your explanations were
very easy to grasp.
I think I found what you're talking about on page 118-119 of
Programming Perl 3, although this point seems very subtle. Is there
anoth
of a read-only value
attempted at ./2001.analogall.pl line 81." The print statement in line
80, just above the substitution statement, shows the contents of $_ to
be "photoshare" like I expected.
I'm really puzzled, why it seems to be indicating that $_ is a
read-only variable. Can anyone enlighten me?
Thanks for your help.
-Kevin Zembower
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Not all systems have to work at 100%. Sometimes, 80% is good enough. In
this case, it would be good enough for me.
I take offense at your rude tone. Cut it out.
-Kevin Zembower
>>> Randal L. Schwartz <[EMAIL PROTECTED]> 03/19/02 10:03AM >>>
In other words, it *cann
il system?
Granted, this wouldn't find all the problems with email addresses, but
it would solve the problem I've been tasked to do.
Thank you for your thoughts and suggestions.
-Kevin Zembower
-
E. Kevin Zembower
Unix Administrator
Johns Hopkins University/Center for Communications
mend to build up this functionality?
Please let me know if doing something like this, i.e., starting an SMTP
dialog with a mailhost, then dropping it after it verified that the user
was okay, would disrupt systems or otherwise cause havoc.
Thank you for your time and suggestions.
-Kevin Zem
Thank you, David, for giving me a fish, and Bob, for teaching me to
fish. It works like a charm.
Thanks, again.
-Kevin Zembower
>>> Bob Showalter <[EMAIL PROTECTED]> 12/19/01 11:21AM >>>
> -Original Message-
> From: KEVIN ZEMBOWER [mailto:[EMAIL PROTECTED]
utput each line, sorted by the key (the random number). I tried
to do this in this program:
www:~ # cat randomize.pl
#! /usr/bin/perl -w
# www:/root/randomize.pl written by Kevin Zembower on 18-Dec-2001 to
randomize line in a file.
# Usually called by:
#./randomize.pl randomized.list
ference, are you saying I could have written:
perl -pi~
-e"s?http://.*\.jhuccp\.org(/cgi-bin/mail2friend)?/cgi-bin/mail2friend?g;"
I agree, but that's SO much typing. :)
Thanks, again for your suggestions.
-Kevin Zembower
>>> Luke Bakken <[EMAIL PROTECTED]> 11/28/0
ber of arguments to?
Thanks for trying to help me with this.
-Kevin Zembower
-
E. Kevin Zembower
Unix Administrator
Johns Hopkins University/Center for Communications Programs
111 Market Place, Suite 310
Baltimore, MD 21202
410-659-6139
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ck
if the make_install_arg is still set.
Thank for your help, Bob.
-Kevin Zembower
>>> Bob Showalter <[EMAIL PROTECTED]> 11/26/01 11:45AM >>>
> -Original Message-
> From: KEVIN ZEMBOWER [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 26, 2001 11:36 AM
till correctly set?]
My questions:
How do I control which directory CPAN installs a module in? Is it a
good idea to force this?
Or:
How do I change the directories in @INC? Is it a good idea to force
this?
Thanks in advance for your help.
-Kevin Zembower
-
E. Kevin Zembower
Unix Administra
sentence.
Thanks, again, for your help. Any other suggestions?
-Kevin
>>> [EMAIL PROTECTED] 07/23/01 10:00AM >>>
On Jul 23, KEVIN ZEMBOWER said:
>I need help writing a regular expression that will match lines that have
>only upper case letters, and sometimes slashes a
my problem.
-Kevin Zembower
-
E. Kevin Zembower
Unix Administrator
Johns Hopkins University/Center for Communications Programs
111 Market Place, Suite 310
Baltimore, MD 21202
410-659-6139
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Brett, that worked like a champ. Thanks for reminding me of what I should have
remembered
on my own.
-Kevin Zembower
>>> "Brett W. McCoy" <[EMAIL PROTECTED]> 06/26/01 10:01AM >>>
On Tue, 26 Jun 2001, KEVIN ZEMBOWER wrote:
> I need some help using the per
learning about
Mail::Sendmail.
Thanks, John, for your suggestion and help.
-Kevin Zembower
>>> John Edwards <[EMAIL PROTECTED]> 06/26/01 09:54AM >>>
Here's a suggestion. Use the Mail::Sendmail module for perl.
http://alma.ch/perl/Mail-Sendmail-FAQ.htm
-Original
to get me started? Also, if I want to print or act on the
exit
code of sendmail, how would I do that?
Thanks for all your help and suggestions.
-Kevin Zembower
-
E. Kevin Zembower
Unix Administrator
Johns Hopkins University/Center for Communications Programs
111 Market Place, Suite 310
Baltimore, MD 21202
410-659-6139
66 matches
Mail list logo