Hi, not sure if this thread still matters to anyone, but for the sake of posterity...
> well, if anyone is following this thread, I decided that
> when the hash keys are converted into an array here:
>
> my @base_pairs = keys %base_pairs;
>
> something is happening that I do not understand. I...
I have taken the liberty of refactoring this a bit...
#!/usr/bin/perl -wT
# -*- cperl -*-
use strict; use warnings; use Data::Dumper;
my %data;
# First, describe the data:
my %rectype =
(
group => +{
# Change * to + if fields are not allowed to be empty...
> if you depend on the numeric sorting (by ID) to generate
> the list, is there any way to sort it by Name ($_[1])
Yes. Here is the part of Kevin's code that does the sorting for output purposes:
sort {$a->{ID} <=> $b->{ID}}
That occurs two places, in output and in outputkids. Both places...
> IS there a module or a set of filters I can run against
> a value to check and see if it is a malicious commmand?
Any such module would be highly bug-prone, because of the large number and wide variety of potential malicious commands. It's much safer to take the opposite approach: don't...
> I found STRICT and WARNINGS very annoying at first but
> have since learnt to live with them and find they are
> extremely useful.
Yeah, I don't always use strict for short scripts, but it is definitely handy for longer ones, *especially* anything long enough that you start thinking about...
> unlink "file.txt";
> Is there a better/correct way to delete a file?
This way is correct. There are other ways, but there is not a better way.
In fact, this way is better than some of the others, because it will work (assuming the filename is correct) irrespective of platform, and also...
> I created the 'INSERT' string programatically for my
> auto populate routine and will follow the same path
> with the working table.
Yes, INSERT is the usual way to add new records. For modifying existing records, UPDATE is more what you want, something along these lines:
my $q =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.