Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Back-to-back line labels!?!?

Status
Not open for further replies.

CJason

Programmer
Oct 13, 2004
223
US
I'm making a code converter. I've run across a problem. I have the following in some code...and, apparently, it's not syntactically acceptable:

come_here:
#
# Some comments
#
come_here2:

I guess you can't have back to back line labels in perl???? Is there some sort of dummy executable line that I can put between these...like "continue_on_to_next_line;"??? OR, does someone have another idea?

Thanks in advance!
 
Code:
ome_here:
#
# Some comments
#
;
come_here2:
#
# Some comments
#
;
come_here3:
#
# Some comments
#
;

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Cool! Can I write it like this (I'm away from my dev machine right now):

Code:
;come_here:
#
# Some Comments
#
;come_here2:

In other words, just blindly add the ";" at the beginning of the line?
 
FYI...It worked to blindly put ";" before these lines! Thanks Kevin!
 
Code:
print join(";\n;", @code);
perhaps? [wink]

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
You have truly made me feel like a geek this morning because I am laughing at that....
 
Mmm. Note to self: Must get out more...

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top