Extra newline characters.
I'm working the exercises out of the Learning Perl book, but I'm doing so through a shell account from a Window$ box into a UNIX environment. I'm experiencing an oddity wherein I'm getting, what I think are, extra newlines or carriage returns in my code as I type it in the shell through a telnet session. This phenomenon, of course, throws off the results of the code. Has anyone experienced this? Is there a solution? I've tried several adjustments in the code I'm writing by using an extra 'chomp' or' chop', but this method is hit-and-miss. There may be some ENV variable or something else I can use to get some consistency going. TIA Ron - Do you Yahoo!? vote.yahoo.com - Register online to vote today!
Re: Extra newline characters.
On Fri, 8 Oct 2004 11:11:26 -0700 (PDT), Ron Smith [EMAIL PROTECTED] wrote: I'm working the exercises out of the Learning Perl book, but I'm doing so through a shell account from a Window$ box into a UNIX environment. I'm experiencing an oddity wherein I'm getting, what I think are, extra newlines or carriage returns in my code as I type it in the shell through a telnet session. This phenomenon, of course, throws off the results of the code. Has anyone experienced this? Is there a solution? I've tried several adjustments in the code I'm writing by using an extra 'chomp' or' chop', but this method is hit-and-miss. There may be some ENV variable or something else I can use to get some consistency going. TIA Ron What UNIX environment? What terminal emulator? I know that Solaris includes a handy utility called dos2unix that will help pull out annoying extra characters from DOS created text files. Perhaps this utility is found in other UNIXy OSs as well. --Errin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Extra newline characters.
I'm not sure what you mean. I'm new at logging into shell accounts through a 'telnet' session. I'm on a Window$ 2000 box, using 'telnet' to log into 'sdf.lonestar.org'. The first thing that appears at login is the following: NetBSD/alpha (sdf) (ttypu) Does that help? Ron Errin Larsen [EMAIL PROTECTED] wrote: On Fri, 8 Oct 2004 11:11:26 -0700 (PDT), Ron Smith wrote: I'm working the exercises out of the Learning Perl book, but I'm doing so through a shell account from a Window$ box into a UNIX environment. I'm experiencing an oddity wherein I'm getting, what I think are, extra newlines or carriage returns in my code as I type it in the shell through a telnet session. This phenomenon, of course, throws off the results of the code. Has anyone experienced this? Is there a solution? I've tried several adjustments in the code I'm writing by using an extra 'chomp' or' chop', but this method is hit-and-miss. There may be some ENV variable or something else I can use to get some consistency going. TIA Ron What UNIX environment? What terminal emulator? I know that Solaris includes a handy utility called dos2unix that will help pull out annoying extra characters from DOS created text files. Perhaps this utility is found in other UNIXy OSs as well. --Errin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish.
RE: Extra newline characters.
Try: $ stty sane $ TERM=vt100; export TERM That will give you a common default terminal emulation. I would recommend getting a better windows client terminal. Some good free ones are putty and teraterm. Cygwin is a complete linux emulation package the runs on windows and includes decent terminal emulators (and I believe perl comes with it). -- This email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else, unless expressly approved by the sender or an authorized addressee, is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action omitted or taken in reliance on it, is prohibited and may be unlawful. If you believe that you have received this email in error, please contact the sender, delete this e-mail and destroy all copies. == -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Extra newline characters.
On Fri, 8 Oct 2004, Ron Smith wrote: I'm not sure what you mean. I'm new at logging into shell accounts through a 'telnet' session. I'm on a Window$ 2000 box, using 'telnet' to log into '[OMITTED -- chd]. The first thing that appears at login is the following: NetBSD/alpha (sdf) (ttypu) Does that help? Let's try to nip bad habits in the bud before they take hold. Do you have SSH access to this machine ? Since you just said the host by name -- that was brave! -- I was able to take a look at it and *boy* do you have a lot of ports open. Finger? RPC? Truly the person running this computer is incredibly brave :-) The telnet protocol is extremely insecure. Among other things, all traffic, including passwords, is transmitted as clear text, so anyone watching packets stream by can see everything you're doing. Danger! This server is also running SSH, which is much, much safer to use than Telnet. If possible, you should use SSH and forget telnet ever existed. - $ ssh blah.blah.blah.org The authenticity of host 'blah.blah.blah.org (300.400.500.600)' can't be established. RSA key fingerprint is So:me:-c:ha:in:-o:f-:le:tt:er:s-:an:d-:di:gi:ts. - Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'blah.blah.blah.org,300.400.500.600' (RSA) to the list of known hosts. [EMAIL PROTECTED]'s password: - [ENTER YOUR PASSWORD HERE; IT ISN'T ECHOED BACK TO YOU. --chd] The - lines indicate places you need to type in a response. If all goes well here, you'll get a prompt after the password. And tell whoever is running this machine that they should lock it down. -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Extra newline characters.
atleast he omited login+pwd. :) - Original Message - From: Chris Devers [EMAIL PROTECTED] Date: Friday, October 8, 2004 3:03 pm Subject: Re: Extra newline characters. On Fri, 8 Oct 2004, Ron Smith wrote: I'm not sure what you mean. I'm new at logging into shell accounts through a 'telnet' session. I'm on a Window$ 2000 box, using 'telnet' to log into '[OMITTED -- chd]. The first thing that appears at login is the following: NetBSD/alpha (sdf) (ttypu) Does that help? Let's try to nip bad habits in the bud before they take hold. Do you have SSH access to this machine ? Since you just said the host by name -- that was brave! -- I was able to take a look at it and *boy* do you have a lot of ports open. Finger? RPC? Truly the person running this computer is incredibly brave :-) The telnet protocol is extremely insecure. Among other things, all traffic, including passwords, is transmitted as clear text, so anyone watching packets stream by can see everything you're doing. Danger! This server is also running SSH, which is much, much safer to use than Telnet. If possible, you should use SSH and forget telnet ever existed. - $ ssh blah.blah.blah.org The authenticity of host 'blah.blah.blah.org (300.400.500.600)' can't be established. RSA key fingerprint is So:me:-c:ha:in:-o:f-:le:tt:er:s-:an:d- :di:gi:ts. - Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'blah.blah.blah.org,300.400.500.600' (RSA) to the list of known hosts. [EMAIL PROTECTED]'s password: - [ENTER YOUR PASSWORD HERE; IT ISN'T ECHOED BACK TO YOU. --chd] The - lines indicate places you need to type in a response. If all goes well here, you'll get a prompt after the password. And tell whoever is running this machine that they should lock it down. -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Extra newline characters.
On Fri, 8 Oct 2004 [EMAIL PROTECTED] wrote: atleast he omited login+pwd. :) Thank Cthulu for minor disasters... -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Extra newline characters.
Whoa! Easy big fella! sdf.lonestar.org is a *FREE* public access system. No reason for secrecy or alarm. Notice the *FREE* and remember, you get what you pay for. And they do tell you about using ssh for access when you initially sign up. On Fri, 8 Oct 2004, Chris Devers wrote: Date: Fri, 8 Oct 2004 15:03:48 -0400 (EDT) From: Chris Devers [EMAIL PROTECTED] Reply-To: Perl_beginners [EMAIL PROTECTED] To: Ron Smith [EMAIL PROTECTED] Cc: Perl_beginners [EMAIL PROTECTED], Errin Larsen [EMAIL PROTECTED] Subject: Re: Extra newline characters. On Fri, 8 Oct 2004, Ron Smith wrote: I'm not sure what you mean. I'm new at logging into shell accounts through a 'telnet' session. I'm on a Window$ 2000 box, using 'telnet' to log into '[OMITTED -- chd]. The first thing that appears at login is the following: NetBSD/alpha (sdf) (ttypu) Does that help? Let's try to nip bad habits in the bud before they take hold. Do you have SSH access to this machine ? Since you just said the host by name -- that was brave! -- I was able to take a look at it and *boy* do you have a lot of ports open. Finger? RPC? Truly the person running this computer is incredibly brave :-) The telnet protocol is extremely insecure. Among other things, all traffic, including passwords, is transmitted as clear text, so anyone watching packets stream by can see everything you're doing. Danger! This server is also running SSH, which is much, much safer to use than Telnet. If possible, you should use SSH and forget telnet ever existed. - $ ssh blah.blah.blah.org The authenticity of host 'blah.blah.blah.org (300.400.500.600)' can't be established. RSA key fingerprint is So:me:-c:ha:in:-o:f-:le:tt:er:s-:an:d-:di:gi:ts. - Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'blah.blah.blah.org,300.400.500.600' (RSA) to the list of known hosts. [EMAIL PROTECTED]'s password: - [ENTER YOUR PASSWORD HERE; IT ISN'T ECHOED BACK TO YOU. --chd] The - lines indicate places you need to type in a response. If all goes well here, you'll get a prompt after the password. And tell whoever is running this machine that they should lock it down. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Extra newline characters.
On Fri, 8 Oct 2004 11:51:34 -0700 (PDT), Ron Smith [EMAIL PROTECTED] wrote: I'm not sure what you mean. I'm new at logging into shell accounts through a 'telnet' session. I'm on a Window$ 2000 box, using 'telnet' to log into 'sdf.lonestar.org'. The first thing that appears at login is the following: NetBSD/alpha (sdf) (ttypu) Does that help? Ron Errin Larsen [EMAIL PROTECTED] wrote: On Fri, 8 Oct 2004 11:11:26 -0700 (PDT), Ron Smith wrote: I'm working the exercises out of the Learning Perl book, but I'm doing so through a shell account from a Window$ box into a UNIX environment. I'm experiencing an oddity wherein I'm getting, what I think are, extra newlines or carriage returns in my code as I type it in the shell through a telnet session. This phenomenon, of course, throws off the results of the code. Has anyone experienced this? Is there a solution? I've tried several adjustments in the code I'm writing by using an extra 'chomp' or' chop', but this method is hit-and-miss. There may be some ENV variable or something else I can use to get some consistency going. TIA Ron What UNIX environment? What terminal emulator? I know that Solaris includes a handy utility called dos2unix that will help pull out annoying extra characters from DOS created text files. Perhaps this utility is found in other UNIXy OSs as well. --Errin Hi again, Ron, First, try to bottom post. People on this list will snap at 'ya if your don't! Yes, that helps, it tells us what OS you're writing for, and also how you connect to that OS (DOS telnet). Now, where do you develop your scripts? Do you write your scripts on the Win2000 machine and then copy/ftp them over to the UNIX box to test/implement? The more details you give us the better able we'll be to help! --Errin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Fwd: Extra newline characters.
-- Forwarded message -- From: Errin Larsen [EMAIL PROTECTED] Date: Fri, 8 Oct 2004 15:36:28 -0500 Subject: Re: Extra newline characters. To: Ron Smith [EMAIL PROTECTED] On Fri, 8 Oct 2004 13:24:22 -0700 (PDT), Ron Smith [EMAIL PROTECTED] wrote: SNIP Thanks for your help :-). You're welcome! I'm simply loging into a free shell account, then using 'vi', on the other end, to write the scripts. But, I get odd behavior from the shell(s) when I execute the script (again on the other end). --Ron My guess, in this case, is that you're terminal emulator (DOS) is having trouble talking to the shell. I would try some of the suggestions from Kevin: Try: $ stty sane $ TERM=vt100; export TERM That will give you a common default terminal emulation. I would recommend getting a better windows client terminal. Some good free ones are putty and teraterm. Cygwin is a complete linux emulation package the runs on windows and includes decent terminal emulators (and I believe perl comes with it). I'm wondering what shell you are using? you can type: # echo $SHELL on most UNIX accounts, this will be set for you and will contain your default shell. Kevin's suggestions will work with most shells, but Cshell would likely complain. I think your problem is more shell and terminal-emulation related, rather than Perl related. I'd suggest a good new-to-UNIX book, If I were you. Do you have a SysAdmin you can contact with problems or help-needed questions? If so, I would explain your problem to her/him as she/he (wow, that's annoying, huh? trying to keep PC is a pain!) would be most familiar with your environment and terminal options. I also agree with Kevin that a good terminal emulation program could help you. To follow Chris' advice, the really good ones will support SSH, as well. I'd suggest Putty: http://www.chiark.greenend.org.uk/~sgtatham/putty/ --Errin PS: I forgot to mention some further [EMAIL PROTECTED] mailing list etiquette: Try to CC the list with your replies, as well. Some people will complain if you don't! Keep up the UNIX and Perl learning! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Extra newline characters.
Thanks all. The problem was at the begining of the 'TELNET' session, I have to type in: UNSET CRLF. - Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish.
Re: Extra newline characters.
On Fri, 8 Oct 2004 15:25:36 -0700 (PDT), Ron Smith [EMAIL PROTECTED] wrote: Thanks all. The problem was at the begining of the 'TELNET' session, I have to type in: UNSET CRLF. Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. You're welcome! and welcome to the list!! --Errin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response