Message: Invalid argument: IE 8 Issue

In my Perl based server application, I want to execute a script in a new pop up window. I was using a syntax like:

var my_window =', 'my window', 'width=800,height=600,resizable,scrollbars');

When I run the program in FF and Chrome it all works fine. I can open my pop-up window with above parameters and can see my desired result but the issue starts when I do the same test with IE 8. In spite of pop-up blocker off, the pop-up window was not launching, it was giving me a error message like:

Message: Invalid argument.
Line: 100 Char: 5
Code: 0

After debugging I found a solution which is some way very ridiculous. Issue was because of the reason that Microsoft does support the name property in with spaces [] this means that if I make my like [See GREEN string

var my_window =', <strong><span style="color:#00ff00;">'my_window', 'width=800,height=600,resizable,scrollbars');

then it should works.

After doing this change it works with me for all the browsers.

I don’t know why IE always through such type of errors,  even if you launch the in-built Developer tool from IE interface then also you will get the same error message  “Invalid arguments” no further clue/pointer to solve the issue. MS really has to improve the error handling messages to user.

So guys, be careful while developing pop-up window for all browsers specially for IE.


Static variables/functions in Perl: Journey from C++ to Perl

I am relatively new to Perl.. in fact not so new now it’s been almost 3 years but frankly I am still learning new things on daily basis so much to learn. Great language and community it’s privilege to be part of ! Prior to Perl I was programming in C/C++ for 3 years and before that I was programming mostly in C and assembly languages. So it’s been wonderful journey till now learning many languages. Well, as C++ was my last language before Perl so I sometime use my C++ OO concepts to understand the same OO concepts in Perl. I don’t know if this is the correct approach or not but for me it helps. Last weekend I was just thinking about static variables and static functions/methods in C++.  Second obvious thought was how we implement them in Perl? or in fact do we really need them? As we don’t have private, public, protected keyword in Perl so how we are going to implement these features and setting the access inside and outside class? How Perl allocates the memory for static variable? Can we get this behavior just by declaring a variable outside of functions in a package or does const module will help?

So many questions, Well I might get some answers from web but I thought that it would be better idea to use this platform and ask directly to experts.  Would be nice if you guys can help me to understand and also direct me to some documentation links which compare the OO features in C++ and Perl.

Thanks for reading !