Gday,
According to the perlfunc reference,
"When used on a hash element, it tells you whether the value is defined, not whether the key exists in the hash. Use exists for the latter purpose."
So your checking line should read:
if (!exists($GlobalUserList{$UserID}))
If you are running this program from a command line, try "progname 2> errlog.txt" or "progname > all-log.txt 2>&1"
(And remove your STDERR close and reopen from your code).
The first redirects only STDERR to a file, and the second redirects both STDOUT and STDERR.
Hope this...
Gday all,
Don't want to start a religious war here, but saying "perl is hard to read" is not really correct (IMHO): anyone can write a program that is hard to read in any language! Just try supporting some of them!!
But the way I read the ternary operator ( .. ? .. : .. ) for...
Gday Maunir,
Make sure your perl program starts with a correct shebang (in your instance #!/usr/bin/perl).
If perl is installed correctly, running "perl -v" should tell you a story about your installation. This will also allow you to verify what you installed.
Regards,
Pat
Gday coder1
Welcome to perl!
Yes, perl programs can be run on NT. Works brilliantly. As with anything under NT, you are subject to your level of privilege. So you can list domain users and set all their names to Zaphod Beeblebrox if that be your fancy (and you have the correct rights).
I use...
Gday there,
In my report classes, I generally create a "SetParams" method. In your case, I would create one as:
void __fastcall TMyReport::SetParams(TDateTime fromdate, TDateTime todate)
{
// do something with dates
DateLabel->Caption =...
Gday Douglas,
The help stuff on exceptions mentions an exception object reference being passed to the handler. Try (pardon the pun) the following:
string str="PARAM_1:15";
try{
int assig=str.find('=',0);
if(assig==string::npos)
{
Exception *e = new...
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.