I need help with Perl!!?

Sarah

New member
I'm in an intro to Computer Science course this year, and we are currently working with a program called Perl.

Part of our assignment is to make the program say "Hola Mundo!" with exclamation points at the beginning and end. How do I get the upsidedown exclamation point at the beginning?

Also, I can't get my program to post answers on the next line. I know \n is supposed to be used, but everytime I put it in my program, I get a syntex error.

Please help!!
 
if you want to print out special characters, you're going to want to use "printf" instead of "print". You can insert "%c" into the string of what you want to print, and then it'll convert the second argument of the function into the ASCII character that the number represents. So...
printf("%cHola Mundo!\n",173);
should print out what you want. 173 is the ASCII value for an upside down exclaimation mark I think.

As well, are you putting the "\n" INSIDE of the quotes of a print or printf call?

print("hey noobs");\n is wrong.
print("hey pros\n"); is right.

Hope this helps.
 
Back
Top