Code Comments
Programming Forum and web based access to our favorite programming groups.Hi I am printing the message using print statement. print "the message is = $msg"; How to add control G in that. Regards Sreedhar Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.
Post Follow-up to this messageOn Wed, 27 Oct 2004 Sreedhar.Kalkunte-Venkatachala@ubs.com wrote: > I am printing the message using print statement. print "the message is $ms g"; > > How to add control G in that. You still don't seem to be looking these questions up for yourself before turning to this list. Please, please learn to use Google, or a Perl tutorial book. According to -- <http://life.csu.edu.au/~lbenton/ascii-chart.html> <http://www.i-logic.com/serial/ascii.htm> -- control-G is the BEL character in ASCII, hex code 7. So, a Google search for 'perl "bell character"' -- <http://www.google.com/search?q=perl...ll+character%22> -- turns up several promising links, the third of which is -- <http://www.objectsdevelopment.com/p...rs. html> -- and when I search that page for "bel" (the second "l" might or might not show up in the term, so I'm leaving it out to be safe), I find: Strings can be of any length and can contain any characters, numbers, punctuation, special characters (like `!', `#', and `%'), and even characters in natural languages besides English In addition, a string can contain special ASCII formatting characters like newline, tab, and the "bell" character. -- and, a bit further down the page, a table with common escape sequences for inserting special characters like BEL into interpolated strings in Perl. Not only that, there's then a sample program that uses several of these characters, including the one you're asking about. If you go to that page, you will see what the escape sequence is and how the author of that page is using it in the example. Finding that took about 2 minutes. Writing about it for you took about 5. Next time around, please at least try to find answers for yourself. -- Chris Devers
Post Follow-up to this messageIn article < 2F2199D9F044794EA34CA487BA9F5BD60B8A93@N LDNC003PEX1.ubsgs.ubsgro up.net>, Sreedhar.Kalkunte-Venkatachala@ubs.com (Sreedhar Kalkunte-Venkatachala) writes: >Hi > >I am printing the message using print statement. print "the message is = >$msg"; > >How to add control G in that. I assume that what you want to do is ring the bell. In which case, if you type perldoc perlop and look for "Quote and Quote-like Operators", you'll see: \a alarm (bell) (BEL) -- Peter Scott http://www.perldebugged.com/ *** NEW *** http://www.perlmedic.com/
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.