I've got an array full of dates in the form ('dd/mm/yy', 'dd/mm/yy', ... etc. (I'm from the UK). I want to use Perl's built in sort function to sort them in order and in reverse order.
Any help much appreciated.
-Ed ;-)
________________________________
Destiny is not a matter of chance; it...
The code bellow was working fine until I changed something by mistake and suddenly it says only this when I try to run it:
Warning: Content-Type header not found in the script output. If this script is not a CGI one, please use the Run -> Run in Command Prompt menu to run it.
Execution of...
I have recently discovered the folloeing device:
print <<HTML_END;
(What you want to print)
HTML_END
And find it very useful. My questiuon is this: if what you want to print contains lots of @ and $ signs in (as in talking about email addresses and currency rather than variables), is there...
I'm only a beginner at using regular expressions, and would like to know how to use one to see if $variable contains only digits or not. I.e. I want a statement that returns false if $variable contains any character other than a digit.
Any help would be very much appreciated.
-Ed ;-)...
If I have the name of a variable stored in another variable, can I read the contents of the variable? EG:
$nameOfVariable = "foo";
$foo = "contents of variable that I want to read";
# Now, supposing that $foo could be anything,
# eg. $sweetcorn, is it possible to...
What would you say is the best way to sort a list in alphabetical order?
Any help would be apprieciated,
Merry Xmas,
-Ed ;-)
________________________________
Destiny is not a matter of chance; it is a matter of choice.
What's a quick way to check that a six character string is a valid hex value (i.e. contains only numbers and letters A-F?)? I expect it would invlove regular expressions but haven't got the hang of them yet, so would apprieciate some help.
-Ed ;-)
________________________________
Destiny is...
I've started making a website using CSS at the following address:
http://www.hyperhive.com/test/
In IE it displays just how I want it, but I also want my website to be compatible with Netscape 6 and 7 and Opera. With these browsers there are two problems:
* The absolute positioned <DIV> tags...
PHP has a superglobal array called $_SERVER, which is useful when handling 404 errors on Unix Apache servers. In this array you can access REDIRECT_URL, REDIRECT_STATUS, REDIRECT_ERROR_NOTES, and REDIRECT_REQUEST_METHOD variables. Is there a way of accessing these in Perl?
-Ed ;-)...
Is it possible to run a perl script from inside another perl script?
-Ed ;-)
________________________________
Destiny is not a matter of chance; it is a matter of choice.
I know how to split a scalar every character:
$scalar = 'AABBCC';
@list = split('', $scalar);
But how can a split it every OTHER character, so @list = ('AA', 'BB', 'CC')?
-Ed ;-)
________________________________
Destiny is not a matter of chance; it is a matter of choice.
On MSDN it says you can access the svailable screen width using screen.availWidth, but when I try this using MSVC++ I get the compiler error:
error C2065: 'screen' : undeclared identifier
Do I need to declare screen or something? How do I do this? Any help would be appreciated. -Ed ;-)...
I've just started programming for Windows and want to know how to make a window maximized when it starts. I looked at the styles listed on MDSN and thought I'd add WS_MAXIMIZE to the style property when I use CreateWindow.
hwnd = CreateWindow ("Window Class 1"...
I don't run my server myself by the way, I just pay a company to do it.
Right. I have an SSI file called "index.stm" that gets information from a CGI script called "script.pl" like this:
<!--#exec cgi="/cgi-bin/script.pl?querystring"-->
That works fine, and...
I'm not too good at regular expressions yet, so I would much apprieciate it if someone could tell me one that returns true if a password only just uses characters a-z, A-Z and 0-9 and returns false if it uses any other character. -Ed ;-)
________________________________
Destiny is not a matter...
Two questions about pop-ups
---------------------------
1: At the momment I have a form like this:
<FORM method="post" action="../cgi-bin/processMsg.pl" ...
Is it possible to get processMsg.pl to open in a pop-up window?
2: Is it possible to refresh from a pop-up the...
I want to play a sound called chomp.wav that is stored as a resource. I found:
PlaySound("SoundName", hInst, SND_RESOURCE | SND_ASYNC);
on MSDN but when I try and compile this it says hInst is undeclared. What do I have to do to hInst?.
Also, I haven't used resources before. All...
I'd really like to run .pl files from my .stm files. I've tried:
<!--#exec cgi="cgi-bin/hello_wold.pl"-->
like it suggests on microsoft's website but nothing happens.
Edmund (user name a1194092)
-Ed ;-)
________________________________
Destiny is not a matter of chance; it is a...
I am trying to make a snakes game in the cosole window that uses the
following code to take keyboard input:
INPUT_RECORD InputRecord;
DWORD Events=0;
ReadConsoleInput(stdIH, &InputRecord, 1, &Events);
if(InputRecord.EventType == KEY_EVENT &&
InputRecord.Event.KeyEvent.bKeyDown)
{...
I know that in time.h there is a time(NULL) function that returns the number of seconds scince something and I know how to use this to make things happen every second, for instance.
But what if you want more acurate than a second, for making things happen every 0.4 seconds for instance? -Ed...
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.