[11217] in Perl-Users-Digest
Perl-Users Digest, Issue: 4817 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Feb 3 18:17:23 1999
Date: Wed, 3 Feb 99 15:00:21 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 3 Feb 1999 Volume: 8 Number: 4817
Today's topics:
"glob"bing dot files jackcholt@yahoo.com
Re: "glob"bing dot files <ludlow@us.ibm.com>
Re: "glob"bing dot files (Martien Verbruggen)
Re: "glob"bing dot files (Martien Verbruggen)
Re: alternative perl NG for newbies? <emschwar@mail.uccs.edu>
Re: alternative perl NG for newbies? (Martien Verbruggen)
Are sub-second timers possible in Perl? <Jeffrey_Davey-P93404@email.mot.com>
Re: Array of Dates Prior to Today (Greg Bacon)
Best string/hex/string conversion? <tomw@action.cnchost.com>
Re: Best string/hex/string conversion? (Greg Bacon)
Re: Best string/hex/string conversion? <tomw@action.cnchost.com>
Re: Best string/hex/string conversion? <uri@ibnets.com>
Re: Calling a data from the database to the html page (Martien Verbruggen)
can't seem to get an appropriat data structure - any po <brad@langhorst.com>
Re: can't seem to get an appropriat data structure - an (Greg Bacon)
capturing output during telnet session <lee.ramirez@westgroup.com>
mesg: cannot change mode ??? (Darren Greer)
Re: Need REGEX <uri@ibnets.com>
Re: Need REGEX (Larry Rosler)
Newbie ? dmeilinger@cng.dl.nec.com
Re: newbie having trouble with concatination (Steve Linberg)
Re: Perl Criticism [summary] <tripp.lilley@perspex.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 03 Feb 1999 21:28:29 GMT
From: jackcholt@yahoo.com
Subject: "glob"bing dot files
Message-Id: <79af1j$1ov$1@nnrp1.dejanews.com>
I'm using the glob function to get a list of files in a directory but I notice
that it doesn't seem include files that start with a period (".") which are
normally hidden in unix. Is there a way to get glob to include them or is
there an alternative function that could be used?
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 03 Feb 1999 16:05:49 -0600
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: "glob"bing dot files
Message-Id: <36B8C83D.7E70E288@us.ibm.com>
jackcholt@yahoo.com wrote:
> I'm using the glob function to get a list of files in a directory but I notice
> that it doesn't seem include files that start with a period (".") which are
> normally hidden in unix. Is there a way to get glob to include them or is
> there an alternative function that could be used?
my @files = (glob(".*"), glob("*"));
The first glob matches anything that starts with a period. The second
one grabs all the other files. Keep in mind that this is going to
capture '.' and '..' also.
--
James Ludlow (ludlow@us.ibm.com)
(Any opinions expressed are my own, not necessarily those of IBM)
------------------------------
Date: Wed, 03 Feb 1999 22:32:12 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: "glob"bing dot files
Message-Id: <M74u2.16$_E3.3664@nsw.nnrp.telstra.net>
In article <79af1j$1ov$1@nnrp1.dejanews.com>,
jackcholt@yahoo.com writes:
> I'm using the glob function to get a list of files in a directory but I notice
> that it doesn't seem include files that start with a period (".") which are
# perldoc -f glob
=item glob EXPR
=item glob
Returns the value of EXPR with filename expansions such as the standard Unix shell F</bin/sh> would
How would you do it in the shell?
# ls .*
I wonder if this works:
# perl -le 'print <.*>'
# perl -le 'print glob ".*"'
It does.
Martien
--
Martien Verbruggen |
Interactive Media Division | We are born naked, wet and hungry. Then
Commercial Dynamics Pty. Ltd. | things get worse.
NSW, Australia |
------------------------------
Date: Wed, 03 Feb 1999 22:35:05 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: "glob"bing dot files
Message-Id: <ta4u2.18$_E3.3664@nsw.nnrp.telstra.net>
In article <36B8C83D.7E70E288@us.ibm.com>,
James Ludlow <ludlow@us.ibm.com> writes:
> my @files = (glob(".*"), glob("*"));
No need for two calls to glob, or a temp list:
my @files = glob '.* *';
Martien
--
Martien Verbruggen |
Interactive Media Division | Very funny Scotty, now beam down my
Commercial Dynamics Pty. Ltd. | clothes.
NSW, Australia |
------------------------------
Date: 03 Feb 1999 14:37:33 -0700
From: Eric The Read <emschwar@mail.uccs.edu>
Subject: Re: alternative perl NG for newbies?
Message-Id: <xkf90efkw2q.fsf@valdemar.col.hp.com>
Andrew Fry <andrewf@beausys.demon.co.uk> writes:
<snip>
> It is utter nonsense to suggest that some people might resort to using
> the NG as the one and only means of finding answers to questions.
<snip>
Utter nonsense or no, did you really have to quote 159 lines of text to
add that little gem of wisdom?
Sheesh.
-=Eric
------------------------------
Date: Wed, 03 Feb 1999 21:55:01 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: alternative perl NG for newbies?
Message-Id: <VA3u2.8$_E3.3196@nsw.nnrp.telstra.net>
> It is utter nonsense to suggest that some people might resort to using
> the NG as the one and only means of finding answers to questions.
It's not. It's experience. We _know_ that certain people will do that,
and certain people have stated so themselves.
Martien
PS. Please, for future reference: Do _not_ quote 150+ lines of
irrelevant message just to respond to one line with one of your own.
It's considered rude, it's wasteful, and it's against standard Usenet
etiquette.
--
Martien Verbruggen |
Interactive Media Division | I'm just very selective about what I
Commercial Dynamics Pty. Ltd. | accept as reality - Calvin
NSW, Australia |
------------------------------
Date: Wed, 03 Feb 1999 15:40:14 -0700
From: Jeffrey Davey <Jeffrey_Davey-P93404@email.mot.com>
Subject: Are sub-second timers possible in Perl?
Message-Id: <36B8D04E.4392D4DD@email.mot.com>
Hello, all.
I am trying to implement a sub-second timer in Perl, but up to now
haven't even been able to determine if this is possible. The
Sys::AlarmCall module (and therefore the alarm command) only has a
resolution of one second. I need timeouts in the milliseconds.
Unfortunately, I am very unfamiliar with signals, so I can't even tell
if it can do this or not. Somewhat cryptic to these newbie eyes.
Can anyone out there help? I've scanned the FAQ questions, but haven't
found much helpful info yet.
Anything right now would be greatly appreciated. Thanks!
jeff
------------------------------
Date: 3 Feb 1999 21:44:31 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Array of Dates Prior to Today
Message-Id: <79afvv$8p8$1@info.uah.edu>
In article <79aaom$u41$1@nnrp1.dejanews.com>,
johnsteele@my-dejanews.com writes:
: Can anyone suggest a reasonably fast way to generate a list of N dates
: prior to today?
sub past_dates {
my $n = shift;
my $today = shift || 0;
my $now = time;
my @dates;
my($d,$m,$y);
for (my $i = $today ? 0 : 1; $i <= $n; $i++) {
($d,$m,$y) = ( localtime($now - $i * 60 * 60 * 24) )[3,4,5];
$y += 1900;
$m++;
push @times, sprintf "%d/%02d/%02d", $y, $m, $d;
}
@times;
}
Use it like
# today and ten days prior
for (past_dates 10, 'include today') {
print "$_\n";
}
or
# just the past ten days
for (past_dates 10) {
print "$_";
}
Using 'include today' as a true value might fool the poor guy who comes
behind you. We discussed this a while back, though. If that bothers
you, just use 1 and 0.
Greg
--
Two most common elements in the universe: Hydrogen & Stupidity.
------------------------------
Date: 03 Feb 1999 13:07:58 PST
From: Tom Williamson <tomw@action.cnchost.com>
Subject: Best string/hex/string conversion?
Message-Id: <36B8B6C9.5459D2E@action.cnchost.com>
I have what I'm sure is a SIMPLE question, I just can't find a SIMPLE
answer for it. I am hoping that someone here knows it.
I have a string of essentially random byte values (from 000 to 255). I
would like to "escape" this into a string formatted like a (very) large
hex number. For example the following series of bytes:
\0xff \x45 \0x27 \0x00 (etc.)
would become:
"0xFF452700...." (etc.)
It would also be nice to be able to convert it back again to the
previous byte stream. Having heard that Perl is really whiz-bang for
manipulating strings and data, I'm sure there is a quick, short and easy
way to do this, but being a Perl newbie, I don't know what it is - all
I've come up with is horrible routines with lots of loops, etc.. Can
anyone help?
Thanks - Tom
tomw@action.cnchost.com
------------------------------
Date: 3 Feb 1999 21:56:50 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Best string/hex/string conversion?
Message-Id: <79agn2$8p8$2@info.uah.edu>
In article <36B8B6C9.5459D2E@action.cnchost.com>,
Tom Williamson <tomw@action.cnchost.com> writes:
: I have a string of essentially random byte values (from 000 to 255). I
: would like to "escape" this into a string formatted like a (very) large
: hex number. For example the following series of bytes:
:
: \0xff \x45 \0x27 \0x00 (etc.)
:
: would become:
:
: "0xFF452700...." (etc.)
Use something like
$series = $stream;
$series =~ s/\\0?x([0-9A-Fa-f][0-9A-Fa-f])\s*/\U$1/g;
$series =~ s/^/0x/;
: It would also be nice to be able to convert it back again to the
: previous byte stream.
$stream = $series;
$stream =~ s/^0x//;
$stream =~ s/([0-9A-Fa-f][0-9A-Fa-f])/\\0x\L$1 /g;
chop $stream;
Hope this helps,
Greg
--
Politics: Poli = Many, Tics = Blood-sucking parasites.
------------------------------
Date: 03 Feb 1999 14:32:58 PST
From: Tom Williamson <tomw@action.cnchost.com>
Subject: Re: Best string/hex/string conversion?
Message-Id: <36B8CAB3.FB537C0D@action.cnchost.com>
Greg Bacon wrote:
> In article <36B8B6C9.5459D2E@action.cnchost.com>,
> Tom Williamson <tomw@action.cnchost.com> writes:
> : I have a string of essentially random byte values (from 000 to 255). I
> : would like to "escape" this into a string formatted like a (very) large
> : hex number. For example the following series of bytes:
> :
> : \0xff \x45 \0x27 \0x00 (etc.)
> :
> : would become:
> :
> : "0xFF452700...." (etc.)
>
> Use something like
>
> $series = $stream;
> $series =~ s/\\0?x([0-9A-Fa-f][0-9A-Fa-f])\s*/\U$1/g;
> $series =~ s/^/0x/;
>
> : It would also be nice to be able to convert it back again to the
> : previous byte stream.
>
> $stream = $series;
> $stream =~ s/^0x//;
> $stream =~ s/([0-9A-Fa-f][0-9A-Fa-f])/\\0x\L$1 /g;
> chop $stream;
>
> Hope this helps,
> Greg
> --
> Politics: Poli = Many, Tics = Blood-sucking parasites.
Well, it did work, but I think I phrased my question poorly. I was looking
for a translation between a string of bytes containing any ASCII values,
even nonprintable ones, into a string containing a pseudo-hex value. For
example if function X() did this translation it would look like:
$mybytes = "^(*^&$#*&$^& <CR/LF> ^@@ <TAB> *#(&^(&%$";
$mystring = X( $mybytes);
print $mystring;
This would print out something like "0xFF3FF4F5DD779346AACD663" (I never
happen to have an ASCII table in front of me when I need one, so I can't
vouch for the values <g>).
And the reverse function, Y( $mystring ) would return the original string of
ASCII "garbage" bytes.
I guess what I'm looking for is pretty much like uuencoding or printable
mime, but I hate to pull in another module just to do one line of code. Any
ideas?
Thanks - Tom
------------------------------
Date: 03 Feb 1999 17:42:12 -0500
From: Uri Guttman <uri@ibnets.com>
To: Tom Williamson <tomw@action.cnchost.com>
Subject: Re: Best string/hex/string conversion?
Message-Id: <39r9s7ds8r.fsf@ibnets.com>
>>>>> "TW" == Tom Williamson <tomw@action.cnchost.com> writes:
TW> Well, it did work, but I think I phrased my question poorly. I
TW> was looking for a translation between a string of bytes containing
TW> any ASCII values, even nonprintable ones, into a string containing
TW> a pseudo-hex value. For example if function X() did this
TW> translation it would look like:
TW> And the reverse function, Y( $mystring ) would return the original
TW> string of ASCII "garbage" bytes.
see pack and unpack. they convert to/from hex strings.
uri
--
Uri Guttman Hacking Perl for Ironbridge Networks
uri@sysarch.com uri@ironbridgenetworks.com
------------------------------
Date: Wed, 03 Feb 1999 22:17:10 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Calling a data from the database to the html page
Message-Id: <GV3u2.9$_E3.3664@nsw.nnrp.telstra.net>
In article <36b94e2a.0@news.smartnet.com.sg>,
"john" <john@mediamanager.com.sg> writes:
> The script should call the database automatically at every 1 minute interval
> and get the banner (advertisement banner) from the database (access or
> anyother db) and put the banner on the HTML page at the client side. If
> anyone has done this then your help in doing this would be much appreciated.
That is a very weird way of serving banners on a web page. Web access
happens when the client decides it. You can't just go off every minute
and push stuff to the client. You don't even know who the client is.
You should probably just download some banner serving thing, maybe
from www.cgi-resources.com, and adapt its source to fetch banners from
your database.
About that: What sort of database? RDBMS? Some proprietary file? text
file?
If the first: I'd use DBI with the appropriate driver to get whatever
you need.
It's really not specific enough a question. I can't be more specific
about the answer.
> I hope that you could respond to this asap. Since I have only 3 days to
> complete the project and I am new to Perl nor have used VB to code CGI
> scripting.
Oh. In that case I would say, and I don't mean that in a bad way,
forget it. There is just no way that you will be able to understand
programming, CGI, perl or VB, plus databases and database programming
in three days. No chance whatsoever. I find it a bit odd that you
believe that 3 days would be enough to learn programming plus a
language, plus a protocol, plus relational databases. Did you think
that good programmers were paid money for nothing?
It's almost an insult.
I would hire someone who knows how to do it. Tell your boss to get
real about this.
Martien
--
Martien Verbruggen |
Interactive Media Division | You can't have everything, where would
Commercial Dynamics Pty. Ltd. | you put it?
NSW, Australia |
------------------------------
Date: Wed, 03 Feb 1999 14:35:46 -0500
From: "Bradley W. Langhorst" <brad@langhorst.com>
Subject: can't seem to get an appropriat data structure - any pointers?
Message-Id: <36B8A512.4B31E388@langhorst.com>
I am new to perl and am trying to build a data structure to
hold some information
specifically
i have a list of loci names
for each locus I have three lists of individuals (one for each "het"
genotype, "ref" genotyep, and "var" genotype)
so i built this data structure
for ($i; $i <@loci;$i++) {
for($j; $j <@refdnas;$j++) {
$dnas{/loci->[$i]}->{$refdnas[$j]} = 'ref';
}
for($j; $j <@hetdnas;$j++) {
$dnas{/loci->[$i]}->{$hetdnas[$j]} = 'het;
}
for($j; $j <@vardnas;$j++) {
$dnas{/loci->[$i]}->{$vardnas[$j]} = 'var';
}
}
if i then run
foreach $locus (keys %dnas){
print $locus . "\n";
print %dnas->{$locus} . "\n";
}
i get a bunch of
SCALAR(0x1400199c8)
HASH(0x1400e9788)
as i understand this i have just created a hash called dnas
with keys = address of an element of the array loci
and values = the address of the hash with values = xdnas and keys =
which type it is
now so i want to step through everything
foreach $locus (keys %dnas){
foreach $dna (keys %dnas->{$locus}) {
#do something here with $dna and $locus
}
}
i may be obvious that I do not understand the
how a hash of and array of hashes works
can anybody explain this to me?
thanks in advance
brad
please cc bwlang@genome.wi.mit.edu
------------------------------
Date: 3 Feb 1999 22:18:03 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: can't seem to get an appropriat data structure - any pointers?
Message-Id: <79ahur$8p8$3@info.uah.edu>
In article <36B8A512.4B31E388@langhorst.com>,
"Bradley W. Langhorst" <brad@langhorst.com> writes:
: i have a list of loci names
: for each locus I have three lists of individuals (one for each "het"
: genotype, "ref" genotyep, and "var" genotype)
You could initialize it all at once as
my %dna = (
# keys are are loci names
'front' => {
# keys are genotypes
# values are references to arrays of individuals
'het' => [ qw( iv1 iv2 iv3 ) ],
'ref' => [ qw( iv4 iv5 iv6 ) ],
'var' => [ qw( iv7 iv8 iv9 ) ],
},
'middle' => {
'het' => [ qw( iv1 iv2 iv3 ) ],
'ref' => [ qw( iv4 iv5 iv6 ) ],
'var' => [ qw( iv7 iv8 iv9 ) ],
},
'end' => {
'het' => [ qw( iv1 iv2 iv3 ) ],
'ref' => [ qw( iv4 iv5 iv6 ) ],
'var' => [ qw( iv7 iv8 iv9 ) ],
},
);
Where $dna{'end'}{'ref'}[1] is iv5, the fifth individual.
However, I imagine you want to construct it incrementally. It's not
clear to me how your raw data is organized. Maybe if you gave an
example, we could help you with the code to construct your big hash.
To traverse this beauty, use something like
foreach my $locus (sort keys %dna) {
my $l = $dna{$locus};
foreach my $gtype ( qw( het ref var ) ) {
print "locus: $locus, genotype $gtype:\n",
join(" ", @{$l->{$gtype}}),
"\n";
}
}
You might want to check out the perldsc and perllol manpages.
Hope this helps,
Greg
--
I considered atheism but there weren't enough holidays.
------------------------------
Date: Wed, 3 Feb 1999 15:29:50 -0600
From: "Lee Ramirez" <lee.ramirez@westgroup.com>
Subject: capturing output during telnet session
Message-Id: <36b8be96.0@wwwproxy3.westgroup.com>
I have the following line in my script using the telnet module:
@output = $obj->cmd("some command")
Below is the output: (please don't study this)
/L-00,"ATLANTA"
/L-01,"MODEM1",6,0,0,2,1,1,#,3,6,1,1,00,"na2","AT&F1&C1&D0E0Q1S0=1","~~~+++~
~~ATH0"
/L-02,"",6,0,0,2,0,0,#,1,2,1,1,00,"","ATQ0&C1&D0S0=1","~~~+++~~~ATH0"
/L-03,"NETWORK1",6,0,0,2,0,1,#,1,2,1,1,00
/L-04,"",6,0,0,2,0,0,#,1,2,1,1,00
/L-05,"IGXATL",4,0,0,1,0,0,#,1,2,1,1,00
/L-06,"RMT-PRNT",4,0,0,2,0,0,#,1,2,1,1,00
/L-07,"CSU1",4,0,0,0,0,0,#,1,2,1,1,00
/L-08,"",6,0,0,2,0,0,#,1,2,1,1,00
/L-09,"",6,0,0,2,0,0,#,1,2,1,1,00
/L-10,"",6,0,0,2,0,0,#,1,2,1,1,00
/L-11,"PA",4,0,0,2,0,0,#,1,2,1,1,00
/L-12,"",6,0,0,2,0,0,#,1,2,1,1,00
/L-13,"",6,0,0,2,0,0,#,1,2,1,1,00
/L-14,"",6,0,0,2,0,0,#,1,2,1,1,00
/L-15,"",6,0,0,2,0,0,#,1,2,1,1,00
/L-16,"TRCCSU1",4,0,0,0,0,0,#,1,2,1,1,00
/G-00
This output goes into @output, but there is no prompt after the command is
issued so I timeout.
I modify my statement to @output = $obj->cmd(String => "some command",
Prompt => "$match")
According to the Perl Module Manual, @output will receive all output between
"some command" and $match, NON-inclusive. Since I receive no system prompt
after "some command" I must match it to some text in the output so I don't
timeout. Therefore I do: $match = '/G-00/'. I get all data up to G-00
I need this output in a file, so I end up having to paste G-00 at the end of
the file. This works, but there has to be a better way. I spent hours
trying many different regular expressions, but to no avail. How can I read
the prompt as well? Or is there some kind of end-of-output trick I need to
use?
BTW I'm using Perl 5.004 on Linux
Thank you,
Lee
------------------------------
Date: Wed, 03 Feb 1999 22:19:30 GMT
From: drgreer@qtiworld.com (Darren Greer)
Subject: mesg: cannot change mode ???
Message-Id: <36b8cb53.1049247978@news.qgraph.com>
Sorry for the repost....but I had the subject in the wrong field on
the last one:
Hello all
Here is my situation. I have a program (on HPUX 10.20, perl 5.004),
that uses the curses module. This program at some point, fires off
another program using a system() call. Both programs use the curses
module. The initial program is fired off from our manufacturing
software as a shell process. The shell process in turn fires off the
second perl program. At that point I get this error message:
mesg: cannot change mode
I am not sure if this is because of the way I am firing off the second
program or what. If this is not a perl issue at all, please let me
know....and I will repost it in the appropriate newsgroup. I figured
I would start here. Thanks,
Darren
------------------------------
Date: 03 Feb 1999 15:02:02 -0500
From: Uri Guttman <uri@ibnets.com>
To: mreilley@clc.cc.il.us
Subject: Re: Need REGEX
Message-Id: <39u2x3dznp.fsf@ibnets.com>
>>>>> "MR" == Mike Reilley <mreilley@clc.cc.il.us> writes:
MR> I have a variable of unknown length say $nline
if all you are looking for is the first for chars, who cares what the
length is. and in perl getting the length is so simple that saying it is
of unknown length makes little sense.
MR> I need to test the first 4 characters of $nline to see if they are
MR> NUMERIC only [0-9]
have you actually tried to code this? have you played with regexes at
all? if you read perlre you could solve this in minutes, much faster
than waiting for a response from usenet.
a clue: look for \d and the {} modifier.
hth,
uri
--
Uri Guttman Hacking Perl for Ironbridge Networks
uri@sysarch.com uri@ironbridgenetworks.com
------------------------------
Date: Wed, 3 Feb 1999 12:53:14 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Need REGEX
Message-Id: <MPG.11225714fee5a1219899fb@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <36b8a182.28785628@piglet.cc.uic.edu> on Wed, 03 Feb 1999
19:24:20 GMT, Mike Reilley <mreilley@clc.cc.il.us> says...
> I have a variable of unknown length say $nline
>
> I need to test the first 4 characters of $nline to see if they are
> NUMERIC only [0-9]
That is quite basic, and would be covered in any decent introductory
Perl book, and is certainly covered in perlre (which you should read a
few times before asking this kind of question again).
if ($nline =~ /^\d{4}/) { ... it matches ... }
You could use [0-9] as you suggest instead of \d, but IMO the latter is
cleaner.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 03 Feb 1999 22:35:33 GMT
From: dmeilinger@cng.dl.nec.com
Subject: Newbie ?
Message-Id: <79aivk$55j$1@nnrp1.dejanews.com>
I'm sure this is a quick one for anyone who has been using Perl for a while.
I am trying to get a string match to change the case of an input string, i.e.
change an occurance of 'KEY' to 'key' or vice versa. I don't want to match
any case (/i) but want to substitute an upper case letter for its lower, etc.
So using:
$temp = "KEY";
It would be.....
"$temp=~ s/ /i" what ?
to give me a $temp that eq "key"
Thanks in advance.
Dirk Meilinger
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 03 Feb 1999 21:23:14 GMT
From: slinberg@crocker.com (Steve Linberg)
Subject: Re: newbie having trouble with concatination
Message-Id: <slinberg-0302991623150001@cc11620-a.lwmrn1.pa.home.com>
In article <79a7jl$qmc$1@pegasus.csx.cam.ac.uk>, mjtg@cus.cam.ac.uk
(M.J.T. Guy) wrote:
> Nope. "." only matches newlines with the /s modifier.
> In your example, the \s* is matching the newline, not the (.*?).
D'oh! Dope smack for me. How embarassing. :P
------------------------------
Date: Wed, 03 Feb 1999 16:14:38 -0500
From: Tripp Lilley <tripp.lilley@perspex.com>
Subject: Re: Perl Criticism [summary]
Message-Id: <36B8BC3E.8E1E2087@perspex.com>
topmind@technologist.com wrote:
> Thank heavens for Wallmarts!
^^^^
Good /heavens/! Can you /imagine/? A Wal-Mart Super Store sized panoply
of Perl goodies! I'm about to wet myself over that concept :-)
Oh, I suppose you meant Wal-Mart. <sigh>. You know, things would go much
easier around here if you'd show a little discipline in your ramblings.
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 4817
**************************************