Perl

Moderators: Jonathan
Number of threads: 1259
Number of posts: 3644

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Merry Christmas Jonathan, what is this... and is it any good? Posted by old_Joe on 28 Dec 2007 at 9:20 AM
I have an old script where they have a "Main:" in it
in the following syntax:

Main:
{
    ###code in here...

}


I've never come across this before, are there any security concerns here?
and why would someone do this?

Hope you New Year is bright!

Regards,
Joe McTigue
Report
Re: Merry Christmas Jonathan, what is this... and is it any good? Posted by Jonathan on 29 Dec 2007 at 9:19 AM
Hi from a chilly Vienna. Thankfully, the airport is warm inside and I'm only here for a few hours anyway - getting a connection and heading for the Perl Workshop in Israel, which is pretty exciting!

: I have an old script where they have a "Main:" in it
: in the following syntax:
:
:
: Main:
: {
:     ###code in here...
: 
: }
:
:
: I've never come across this before, are there any security concerns
: here?
: and why would someone do this?
Took me a moment to realize what it was! Anything followed by a colon is just a label. When you attach a label to a block, you can do things like:

last LABEL;
next LABEL;

And so on. So if you have nested loops you can state which one your control "exceptions" apply to. So look for usages of the Main label in the code, to see why it's there. If it's unused, I'd guess it's redundant.

: Hope you New Year is bright!
Thanks, same to you!

Jonathan

###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
Report
Re: Merry Christmas Jonathan, what is this... and is it any good? Posted by Old Joe (Home) on 29 Dec 2007 at 11:53 AM
: Hi from a chilly Vienna. Thankfully, the airport is warm inside and
: I'm only here for a few hours anyway - getting a connection and
: heading for the Perl Workshop in Israel, which is pretty exciting!
:
:
: : I have an old script where they have a "Main:" in it
: : in the following syntax:
: :
: :
: : Main:
: : {
: :     ###code in here...
: : 
: : }
: :
: :
: : I've never come across this before, are there any security concerns
: : here?
: : and why would someone do this?
: Took me a moment to realize what it was! Anything followed by a
: colon is just a label. When you attach a label to a block, you can
: do things like:
:
: last LABEL;
: next LABEL;
:
: And so on. So if you have nested loops you can state which one your
: control "exceptions" apply to. So look for usages of the Main label
: in the code, to see why it's there. If it's unused, I'd guess it's
: redundant.
:
: : Hope you New Year is bright!
: Thanks, same to you!
:
: Jonathan
:
: ###
: for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
: (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
: /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");


Thanks from Chilli Ohio (US).
Old Joe (home)
Report
Re: Merry Christmas Jonathan, what is this... and is it any good? Posted by Jonathan on 30 Dec 2007 at 10:43 AM
: Thanks from Chilli Ohio (US).
Thankfully, I'm now in Tel Aviv, which has been nice and warm today.

Jonathan

###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
Report
Re: Merry Christmas Jonathan, what is this... and is it any good? Posted by old_Joe on 2 Jan 2008 at 8:10 AM
: : Thanks from Chilli Ohio (US).
: Thankfully, I'm now in Tel Aviv, which has been nice and warm today.
:
:
: Jonathan
:
: ###
: for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
: (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
: /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

Jonathan, quick question... Different topic...

In using DBI, can you send PL/SQL or statements using cursors
in your prepare statements and execute them successfully?

All the Best,
Joe (alias: Old Joe)




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.