check for exact # of digits1134 (8/25/2012 9:56:19 AM) I have this at the beginning of a sub ($checkDate is an input parameter).
I want to check for exactly 8 digits.
This works for less than 8 but doesn't work for more than 8.
if ($checkDate !~ /^\d{1,8}/)... bjlockie(29)
String parsing (2 questions)734 (8/28/2012 9:40:51 PM) My text file contains a list of strings that look similar to this:
ID1 ID2 ID3 Full name ID4
----- --- ------------ ---------------- -----
6523 222 000000564 Adams Cody J ... rcranz143101(13)
spaceless text engine029 (8/29/2012 5:20:34 AM) Announcing a new spaceless open source spaceless text engine project on github.
https://github.com/singularian/respace
It is an alpha spaceless text parser that will attempt to address a data compression ... gigagoth(2)
Semi-random sentence generator624 (8/27/2012 1:06:43 AM) I want to generate some sentences that would seem random enough to look
different, but would, in fact, convey the same message.
For example:
* Please provide a phone number in your response
* You ... Ignoramus11402
Man, has this newsgroup shrunk. Why? Where gone to?2244 (7/31/2012 9:36:36 PM) It's fairly obvious that this group has really shrunk over
the last year or so.
So, what's up?
Surely, perl usage isn't down.
So where are the problems and answers (via perl-answer gurus)
operating f... dkcombs(290)
Neat way of checking that two hash values both exist?826 (8/27/2012 4:17:02 PM) I'm checking parameters to a little utility I'm writing. It uses
Getopt::Std, which returns the parameters in a hash %opts.
The logic of the utility requires both flags -h and -p to be specified
or neit... news192(134)
Very simple hash/regex question1826 (8/23/2012 6:03:26 PM) What is a simple way to copy a hash into for example %hash_copy and change
all characters in the keys of the copied hash to lowercases and all
whitespaces to underscores?
my %hash = ('My first subject ke... tuxedo(96)
Nice bear trap with $FOO file handle and $_343 (8/23/2012 11:10:35 AM) Just fell into a nice bear trap.
open FOO, '>', $bar or die "$!";
while ( )
{
print FOO;
}
I was changing my scripts to using $HANDLE - AIUI this is s "Good
Thing(TM)" although I am no... dave7665(110)
using Template effectively1928 (8/21/2012 8:27:49 AM) Hello Newsgroup,
I got my first points on the scoreboard with the badger book:
$ perl destruct1.pl
People of Earth, your attention please.
This is Prostetnic Vogon Jeltz of the
Galactic Hyper... cal819(188)
undefine @array544 (8/22/2012 7:06:52 PM) I want to delete an array completly.
use strict; use warnings; my
@array=qw/a b c/;
@array=();
undef @array;
print @array;
I expect a warning like "Global symbol "@array" requires explicit..." but it ... nospam.gravitalsun(70)