A very simple question for you guys, expert of hashes:
Can I do that? (I mean... will it work?)
my %myHash ;
$myHast{toto}{tata} = "DID YOU SEE THIS?!" ;
print $myHast{toto}{tata} ;
#will this print 'DID YOU SEE THIS?' or do I have to initialise the hash in some other way?
Thanks for your help.
I think I saw something about knowing the size of an image some time before on this forum but...
I saw somewhere - maybe here... I can't remember - a way of knowing the size of an image without downloading the whole image (by downloading only the header of these).
Concretly... I give an URL of...
I'm don't really know how to open for readding and writing at the same time... Usually, I used to open it in "append" mode and it was fine for me.
What I exactly want to do is:
Replace the $i line without altering the lines before and lines after.
If you have any simple way of doing so...
This is not documented in the CPAN documentation on the CGI module.
Normally, to do some HTTP redirection, I'll use:
print $myCGI->redirect("http://mynewurl.com/toto.html") ;
This is great... but... what happens if I want to post data to this URL I'm asking for a redirection.
How do I do...
How can I list the files and perform an action on eachone.
An algorism of what I want to do could be:
foreach FILE in DIRECTORY {
PERFORM AN ACTION ON THE FILE
}
Thanks in advance.
I have some trouble when using require(): sometimes it works, sometimes it doesn't. Have you faced the same problem?
I have a script that does some requires (12) inside the code (not at the beginning).
When I access the script via my favorite browser (Firefox), it can:
execute 1 require() and...
Is there any way of testing if a varible is one of the values contained in an array.
All this in one line! :)
We can do it using a foreach loop, but I was wondering if there was a standart function for this.
Thanks.
I'm just wondering if the concept of a static variable (like in C: the value is private but keeps it value between calls) exist in Perl?
If yes... how to do this? Is it with "local"?
Thanks for you help.
Can somebody tell me what is wrong with this code:
my @recognisedTags = keys %tmpTagGeneralLists ;
foreach my $i (@recognisedTags) {
print $i ;
}
I'm expecting something like:
but it cames with:
Isn't key suppose to return the list of the keys? like a "string" array?
Thanks for you help.
Hi there,
I manage to solve all my today's problems. Now it is time for tomorrow's ones!
1) I can't make HTTP::Lite work. It work very fine for local pages (pages on localhost: http://localhot/myfile.html), but as soon I want to access ouside websites (I've been trying with...
Hi guys...
Thanks again for all your answers to my previous post... It really helped me. Even if is still not totally fixed... it's getting lot better and I'm less close to suicide!
Another question that is not directly related to Perl but I'm sure that you already faced it and you're nice...
I have some kind of strange problem:
I have a GLOBAL variable declare like:
$url = $CGIHandle->param("url") ; #without any my before
This variable is declared out of any subroutine... but when I want to access to it from one subroutine (in the same file) the value happily changes itself...
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.