IS it possible to create context sensitive functions?
Ie. The function returns different results depending on what context it's called?
my @array =someFunction();
my $scalar =someFunction();
If the function is called in array context I want to return an array, but if it's called in scalar...
I think your right because even though I am not getting the Type Mismatch error it returns false when comparing two files which are exactly the same.
I'll have a look into the links you provided, thanks!
I'm having trouble comparing 2 binary files, can anyone give me a pointer to what I'm doing wrong in the following function:
private function filesSame(FileName1, FileName2)
Const adTypeBinary = 1
'Create Stream objects
Dim BinaryStream1, BinaryStream2
Set BinaryStream1 =...
No it is not that, as I was saying the script works just fine for an inderminate length of time then suddenly stops working for whatever reason. Not sure if it's the number of times the script is run or a time period period (more likely the first). Adding that makes no difference believe me that...
I keep getting strange errors when using PerlScript (on Windows 2000 with IIS).
After an indeterminate period of scripts working just fine they start to fail with strange errors messages such as:
500 Can't locate object method "configure" via package "Net::HTTP" (perhaps you forgot to load...
I'm trying to perform a select that orders the results alphabetically yet always puts a specific one last.
Ie.
Fred, Jane, Sharon, Tracy, Bill
I always want Bill to be last even though the rest are in alphabetical order.
Any help would be greatly appreciated.
Something along the lines of...
Oopps,
I corrected $response->content_type(); to $response->content();
That was a typo...
use HTTP::Request;
use LWP::UserAgent;
use Image::Size;
my $ua = LWP::UserAgent->new(timeout => 30);
my $request = HTTP::Request->new(GET => "http://somewhere.com/image.gif");
my $response =...
I know I'm doing something wrong but could anyone point me to what it is. I'm trying to get the size attributes from a .gif using the code shown below (I think it's something to do with how I'm passing $imageData into imgsize):
use HTTP::Request;
use LWP::UserAgent;
use Image::Size;
my $ua =...
I have actually found a way to do this but there is a downside. It only works with PerlScript so I think is only available to Win32 users unfortunately.
The code below works fine:
<% @LANGUAGE="PerlScript" %>
<%
require 'loggingLibrary.pl';
for(my $i=0;$i<100;$i++) {
if...
Hello,
This should be a pretty easy one for most peeps, I'm hoping someone can help me here. I'm trying to extract a list of urls from a string.
Remembering that urls could be typed "http://blahblah.com" or "www.blahblah.com".
Here is what I have so far.
my @links = $textString =~...
Hi everyone,
I have a CGI script which performs a fair bit of work and I want to stop it running if the user closes their browser or hits back etc.
It's pretty easy in asp, as I could use Response.isClientConnected
Take a look at the following code:
print "Content-Type: text/html\n\n"...
Would you believe it, this works:
use Net::NNTP;
my $nntp= Net::NNTP->new($newsServer, Timeout => 60, Debug => 0);
$nntp->group($group);
my $since=time()-86400;
my $listPointer=$nntp->newnews("$since");
If only all the documentation on the net said that!!
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.