Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Perl


ghost's Avatar
0 0

I'm learning Perl from a Tutorial and it was teaching here-documents, and gave an example. So i copied it, here is the code: ```markup#!/usr/bin/perl #heredoc.pl use warnings; print<<EOF;

This is an example of a here-document.

EOF```and then tried to execute in in command prompt but an error comes up and says: Can't find string terminator "EOF" anywhere before EOF at C:\Perl\Basic Programs\heredoc.pl line 4.

My code is the same as in the tut, but why do i get an error? end3r


ghost's Avatar
0 0

do you think i'm an idiot? really, im not that stupid, but im looking for help, for someone to try it or read it and tell me whats wrong with it and obviously you cant. google is where i found the tut. end3r


bl4ckc4t's Avatar
Banned
0 0

end3r wrote: I'm learning Perl from a Tutorial and it was teaching here-documents, and gave an example. So i copied it, here is the code: ```markup#!/usr/bin/perl #heredoc.pl use warnings; print<<EOF;

This is an example of a here-document.

EOF```and then tried to execute in in command prompt but an error comes up and says: Can't find string terminator "EOF" anywhere before EOF at C:\Perl\Basic Programs\heredoc.pl line 4.

My code is the same as in the tut, but why do i get an error? end3r

change print<<EOF; to print("EOF");

get rid of "this is an example of a here-document

EOF"


ghost's Avatar
0 0

bl4ckc4t: Why do you insist on posting utterly useless shit? :p

end3r: Want to know what your problem is? Well.. it is a secret, but I guess I'll share it.. simply hit enter at the end of your script so there is a newline after EOF :happy:


bl4ckc4t's Avatar
Banned
0 0

T-Metal-Risen wrote: bl4ckc4t: Why do you insist on posting utterly useless shit? :p

end3r: Want to know what your problem is? Well.. it is a secret, but I guess I'll share it.. simply hit enter at the end of your script so there is a newline after EOF :happy:

Utterly useless?

uh, how?

Perl is my main language.

BC


ghost's Avatar
0 0

Ok.. well than I hate to say it, but you obviously don't know your main language too well :p. He's trying to use Heredoc and your comment made absolutely no sense and WAS utterly pointless, all that is necessary is that he include a newline at the end of his script in order for it to recognize the end label.:ninja::happy::angry:


bl4ckc4t's Avatar
Banned
0 0

T-Metal-Risen wrote: Ok.. well than I hate to say it, but you obviously don't know your main language too well :p. He's trying to use Heredoc and your comment made absolutely no sense and WAS utterly pointless, all that is necessary is that he include a newline at the end of his script in order for it to recognize the end label.:ninja::happy::angry:

Ah hah! Thanks for correcting me!

Bl4ckC4t


ghost's Avatar
0 0

thanks t-metal end3r


ghost's Avatar
0 0

end3r wrote: do you think i'm an idiot? really, im not that stupid, but im looking for help, for someone to try it or read it and tell me whats wrong with it and obviously you cant. google is where i found the tut. end3r

I suggested google because no one had helped you for a couple days, and i wanted to contribute ;)


ghost's Avatar
0 0

Ponguile wrote: [quote]end3r wrote: do you think i'm an idiot? really, im not that stupid, but im looking for help, for someone to try it or read it and tell me whats wrong with it and obviously you cant. google is where i found the tut. end3r

I suggested google because no one had helped you for a couple days, and i wanted to contribute ;)[/quote]

lol i think if anything you insulted him a bit ;) comon Ponguile….everyone but the computer illiterate know google is a hackers best friend =Þ


ghost's Avatar
0 0

Oh well if i insulted you than i am sorry…but then again, the answer probably would have been on google so..