Append new line at end of non-quoted text

2014-05-23 Thread Sherman Willden
Disclaimer: I am 67 and not in school. I am doing this for my own satisfaction. How do I get a new line at the end of a non-quoted text. I am doing the following: Use Math::Trig; print pi * 2; print \n; How do I get the new line on the same line of code? I could do my $my_pi_times_two = pi * 2

Re: Append new line at end of non-quoted text

2014-05-23 Thread Jim Gibson
On May 23, 2014, at 2:45 PM, Sherman Willden wrote: Disclaimer: I am 67 and not in school. I am doing this for my own satisfaction. How do I get a new line at the end of a non-quoted text. I am doing the following: Use Math::Trig; print pi * 2; print \n; How do I get the new line

Re: Append new line at end of non-quoted text

2014-05-23 Thread Hal Wigoda
print pi * 2, \n; On Fri, May 23, 2014 at 4:45 PM, Sherman Willden sherman.will...@gmail.com wrote: Disclaimer: I am 67 and not in school. I am doing this for my own satisfaction. How do I get a new line at the end of a non-quoted text. I am doing the following: Use Math::Trig; print pi

Re: Append new line at end of non-quoted text

2014-05-23 Thread Jim Gibson
Please post messages to the list, not to me personally. That way, you will get better answers sooner. On May 23, 2014, at 3:13 PM, Sherman Willden wrote: Thank you, Jim; How do I get rid of the warning message without getting rid of the -w switch? Use the 'use warnings;' pragma in your

Re: Append new line at end of non-quoted text

2014-05-23 Thread Shawn H Corey
On Fri, 23 May 2014 15:52:11 -0700 Jim Gibson jimsgib...@gmail.com wrote: Use the 'use warnings;' pragma in your program instead of '-w' on the first line. That way, you can control which messages are issued. Some modules have to do unsafe things to get the job done; it's the only way. But

new line using print

2010-10-14 Thread Amish Rughoonundon
Hi, I would like to print a file under windows using perl but with the end of line character be only 0x0A and not 0x0D followed by 0x0A. Is there a way to set $\ to 0x0A so that every time I use print, it only prints 0x0A and NOT 0x0D followed by 0x0A. Any other method would also be welcomed.

Re: new line using print

2010-10-14 Thread Shawn H Corey
On 10-10-13 04:16 PM, Amish Rughoonundon wrote: Hi, I would like to print a file under windows using perl but with the end of line character be only 0x0A and not 0x0D followed by 0x0A. Is there a way to set $\ to 0x0A so that every time I use print, it only prints 0x0A and NOT 0x0D followed by

Regex problem, #.*# on new line

2009-03-11 Thread Brent Clark
Hiya I got a string like so, and for the likes of me I can get regex to have it that each line is starts with #abc#. my $a = #aaa#message:details;extra:info;variable:times;#bbb#message:details;extra:info;variable:times;#ccc#not:always;the:same;ts:14:00.00;; $a =~ s/(?!#.#)/$1\n/i; Im so

Re: Regex problem, #.*# on new line

2009-03-11 Thread John W. Krahn
Brent Clark wrote: Hiya Hello, I got a string like so, and for the likes of me I can get regex to have it that each line is starts with #abc#. my $a = #aaa#message:details;extra:info;variable:times;#bbb#message:details;extra:info;variable:times;#ccc#not:always;the:same;ts:14:00.00;; $a

Re: Replacing the n'th line with the new line

2007-08-13 Thread Chas Owens
On 8/12/07, Mr. Shawn H. Corey [EMAIL PROTECTED] wrote: snip perl -pi -le '$_ = something if $. == 10' your_file So if this was in a script rather than a oneliner how would it work? I was playing and can not get it to work in an actual test script. Not surprising since it's not correct.

Re: Replacing the n'th line with the new line

2007-08-12 Thread uglykidtim
On Aug 9, 6:46 am, [EMAIL PROTECTED] (Chas Owens) wrote: On 8/8/07, Jeff Pang [EMAIL PROTECTED] wrote: snip perl -pi -e '$i++;s/^.*$/something/ if $i==10' your_file snip There is no need to keep track of the number of lines with a separate variable. Perl already does this with the $.

Re: Replacing the n'th line with the new line

2007-08-12 Thread Mr. Shawn H. Corey
[EMAIL PROTECTED] wrote: On Aug 9, 6:46 am, [EMAIL PROTECTED] (Chas Owens) wrote: On 8/8/07, Jeff Pang [EMAIL PROTECTED] wrote: snip perl -pi -e '$i++;s/^.*$/something/ if $i==10' your_file snip There is no need to keep track of the number of lines with a separate variable. Perl already does

Re: Replacing the n'th line with the new line

2007-08-12 Thread Jeff Pang
-Original Message- From: [EMAIL PROTECTED] Sent: Aug 11, 2007 9:58 PM To: beginners@perl.org Subject: Re: Replacing the n'th line with the new line On Aug 9, 6:46 am, [EMAIL PROTECTED] (Chas Owens) wrote: On 8/8/07, Jeff Pang [EMAIL PROTECTED] wrote: snip perl -pi -e '$i++;s

Re: Replacing the n'th line with the new line

2007-08-09 Thread Chas Owens
On 8/8/07, Jeff Pang [EMAIL PROTECTED] wrote: snip perl -pi -e '$i++;s/^.*$/something/ if $i==10' your_file snip There is no need to keep track of the number of lines with a separate variable. Perl already does this with the $. variable. Also, a regex that replaces everything is pointless,

Replacing the n'th line with the new line

2007-08-08 Thread Subhash
Hi Is there any way to update the specified line in the file with the new line without having to copy the entire contents once again. Since the file is huge, i dont want to re-write the file. Can anyone suggest me how to do this Thanks Subhash -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: Replacing the n'th line with the new line

2007-08-08 Thread Mr. Shawn H. Corey
Subhash wrote: Hi Is there any way to update the specified line in the file with the new line without having to copy the entire contents once again. Since the file is huge, i dont want to re-write the file. Can anyone suggest me how to do this If the line you are replacing is the same size

Re: Replacing the n'th line with the new line

2007-08-08 Thread Jeff Pang
-Original Message- From: Subhash [EMAIL PROTECTED] Sent: Aug 8, 2007 10:34 PM To: beginners@perl.org Subject: Replacing the n'th line with the new line Hi Is there any way to update the specified line in the file with the new line without having to copy the entire contents once again

Re: New-Line in Regular Expression

2006-09-08 Thread Romeo Theriault
line character after the three dots at the end of the first line. But I can't figure out how to get past it. The \n don't work. I've tried using chomp and then removing the new line character but it still doesn't match. Below is my code that I'm trying to get working and can't seem to get

New-Line in Regular Expression

2006-09-07 Thread Romeo Theriault
login I seem to be matching it in ActiveState's regular expression toolkit, but when I try running the code it doesn't match the lines. I've tracked it down to the new line character after the three dots at the end of the first line. But I can't figure out how to get past it. The \n don't

RE: New-Line in Regular Expression

2006-09-07 Thread Charles K. Clarkson
Romeo Theriault wrote: : Hello, I'm trying to match this line (or more than one) starting from : the words user picard... : : 8/28/2006 1:04:41 PM: Retrieving mail from host mail.maine.edu : [130.111.32.22], user picard... : 8/28/2006 1:04:45 PM: Mail retrieval failed, reason: POP3 Host did :

Re: New-Line in Regular Expression

2006-09-07 Thread D. Bolliger
and returned following error: -ERR \[AUTH\] Invalid login I seem to be matching it in ActiveState's regular expression toolkit, but when I try running the code it doesn't match the lines. I've tracked it down to the new line character after the three dots at the end of the first line. But I can't

Re: New-Line in Regular Expression

2006-09-07 Thread Rob Dixon
: -ERR \[AUTH\] Invalid login I seem to be matching it in ActiveState's regular expression toolkit, but when I try running the code it doesn't match the lines. I've tracked it down to the new line character after the three dots at the end of the first line. But I can't figure out how to get past

Re: New-Line in Regular Expression

2006-09-07 Thread John W. Krahn
following error: -ERR \[AUTH\] Invalid login I seem to be matching it in ActiveState's regular expression toolkit, but when I try running the code it doesn't match the lines. I've tracked it down to the new line character after the three dots at the end of the first line. But I can't figure

Re: New Line Character(s)

2005-10-27 Thread Daniel Kasak
Chris Devers wrote: On Wed, 26 Oct 2005, Timothy Johnson wrote: I think you can use \r instead of \n for Access and Excel. Are you sure about that? I thought Windows used \r\n as a pair (or \n\r?) for the line delimiter. But then, I don't do Windows anymore, so I could be wrong

New Line Character(s)

2005-10-26 Thread Daniel Kasak
. What should I use to get Access to display a new line? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au -- To unsubscribe

RE: New Line Character(s)

2005-10-26 Thread Timothy Johnson
I think you can use \r instead of \n for Access and Excel. -Original Message- From: Daniel Kasak [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 26, 2005 4:18 PM To: beginners@perl.org Subject: New Line Character(s) Greetings. I've got some Perl code that's inserting data

RE: New Line Character(s)

2005-10-26 Thread Chris Devers
On Wed, 26 Oct 2005, Timothy Johnson wrote: I think you can use \r instead of \n for Access and Excel. Are you sure about that? I thought Windows used \r\n as a pair (or \n\r?) for the line delimiter. But then, I don't do Windows anymore, so I could be wrong :-) -- Chris Devers

Re: New Line Character(s)

2005-10-26 Thread Stephen York
If you have \n on its own in Access or Excel you get a new line within a cell. Also if you only have \n all the way through the file, then you effectively have one huge record which can't be loaded into memory (size dependent); \r\n is required in windows to indicate the end of a line. \n only

new line \n for print file

2005-03-31 Thread Brian Volk
Hello, Can someone explain how I can add \n to this line of code If that is really my problem.. :~) copy ($print_file, '//hp-exch/HP4100-IS'); The reason I ask is here's what I'm printing; (teminal veiw) --begin left pGreen Solutions Industrial Cleaner is a non-toxic, heavy-duty

How to remove new line chars

2004-10-21 Thread Abhishek Dave
I am stucking with my problem of reading xml file , I am trying to remove the new line chars form xml file and just readout the xml tags. Please any guys have a look at this one. please guide me some good stuff abut regex in perl . Thanks and Regards, abhishek

Re: How to remove new line chars

2004-10-21 Thread Steve Bertrand
I am stucking with my problem of reading xml file , I am trying to remove the new line chars form xml file and just readout the xml tags. Please any guys have a look at this one. please guide me some good stuff abut regex in perl . perldoc perlretut perldoc perlre Have fun! Steve

Re: How to remove new line chars

2004-10-21 Thread Willy West
On Thu, 21 Oct 2004 11:23:59 -0400 (EDT), Steve Bertrand [EMAIL PROTECTED] wrote: I am stucking with my problem of reading xml file , I am trying to remove the new line chars form xml file and just readout the xml tags. Please any guys have a look at this one. please guide me some

RE: How to remove new line chars

2004-10-21 Thread Bob Showalter
Abhishek Dave wrote: I am stucking with my problem of reading xml file , I am trying to remove the new line chars form xml file and just readout the xml tags. If you're trying to parse XML, use an XML parser. http://perl-xml.sourceforge.net/faq/ -- To unsubscribe, e-mail: [EMAIL

how to skip new line character

2004-09-09 Thread Anish Kumar K.
Hi All As a beginner in PERL, I wrote a small program which reads data from the file and stores in an array. In that process i wanted to skip the new line character... for ex: In my program say a.txt contains man pan tan In the program open INPUT,a.txt or die $!; my @file = INPUT; when I

Fwd: how to skip new line character

2004-09-09 Thread David le Blanc
-- Forwarded message -- From: David le Blanc [EMAIL PROTECTED] Date: Thu, 9 Sep 2004 16:54:56 +1000 Subject: Re: how to skip new line character To: Anish Kumar K. [EMAIL PROTECTED] Is the problem either 1) Remove the end of line character from all lines 2) Remove the end of line

Re: how to skip new line character

2004-09-09 Thread Bee
open F, file.txt; my @file = F; chomp @file; print @file; Is that what you want ? - Original Message - From: Anish Kumar K. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 09, 2004 2:41 PM Subject: how to skip new line character Hi All As a beginner in PERL, I wrote

RE: New Line / Chomp Query

2004-07-25 Thread David Clarke
Codes goes along this way : $current_record = $_; if (substr($current_record, 0, 6) eq 'GRSUMC') { # Remove new line marker chomp($current_record = $current_record); # Attach run no to end of record $current_record = $current_record . $run_no . \n

RE: New Line / Chomp Query

2004-07-23 Thread Bob Showalter
David Clarke wrote: Hi, does anyone know what the new line character value is in Hex for a text file ? Is it 0d 0a ? ASCII newline is 0x0A (decimal 10) On Unix-ish systems, text files end each line with a single newline. On Windows systems, text files end each line with a CR/LF pair (0x0D

Re: New Line / Chomp Query

2004-07-23 Thread James Edward Gray II
On Jul 23, 2004, at 7:16 AM, Bob Showalter wrote: On Mac systems, the terminator is something different (not sure what), but the same concept applies as for Windows AFAIK. Mac OS 9 and below used a single CR (0x0D) as the line terminator. Mac OS X is a Unix-ish system, as you described it, and

RE: New Line / Chomp Query

2004-07-23 Thread Bob Showalter
James Edward Gray II wrote: On Jul 23, 2004, at 7:16 AM, Bob Showalter wrote: On Mac systems, the terminator is something different (not sure what), but the same concept applies as for Windows AFAIK. Mac OS 9 and below used a single CR (0x0D) as the line terminator. Thanks. Is

Re: New Line / Chomp Query

2004-07-23 Thread James Edward Gray II
On Jul 23, 2004, at 7:56 AM, Bob Showalter wrote: Thanks. Is translation to LF performed on input/output (a la Windows), or is $/ set to CR on those systems? No translation. $/ was set to CR and even \n gave you a CR. Luckily, as I said before, Mac OS X is a much more native Perl, being in the

New Line / Chomp Query

2004-07-22 Thread David Clarke
Hi, does anyone know what the new line character value is in Hex for a text file ? Is it 0d 0a ? I'm trying to read in a line of text, chomp it, attach 3 digits at the end of this line, then write this line to output file. But when I write it out, the original input line is written out

Re: remove '\' with new-line

2004-03-03 Thread Jeff Westman
david [EMAIL PROTECTED] wrote: Jeff Westman wrote: I need a one-liner to convert all occurances read from a Unix pipe of 'backslash' + 'literal new line (hex 0a)' to become just 'literal new line (hex 0a)' That is, remove the '\' only when it preceeds a new-line

remove '\' with new-line

2004-03-02 Thread Jeff Westman
I need a one-liner to convert all occurances read from a Unix pipe of 'backslash' + 'literal new line (hex 0a)' to become just 'literal new line (hex 0a)' That is, remove the '\' only when it preceeds a new-line. Again, this must be read from a pipe. This is what I have so far

Re: remove '\' with new-line

2004-03-02 Thread david
Jeff Westman wrote: I need a one-liner to convert all occurances read from a Unix pipe of 'backslash' + 'literal new line (hex 0a)' to become just 'literal new line (hex 0a)' That is, remove the '\' only when it preceeds a new-line. Again, this must be read from a pipe

Re: remove '\' with new-line

2004-03-02 Thread John W. Krahn
Jeff Westman wrote: I need a one-liner to convert all occurances read from a Unix pipe of 'backslash' + 'literal new line (hex 0a)' to become just 'literal new line (hex 0a)' That is, remove the '\' only when it preceeds a new-line. Again, this must be read from a pipe

Spreadsheet::WriteExcel - Unix New line

2003-01-16 Thread Paul Kraus
I wrote a script that generates an excel file. I tested it on a windows xp pro machine and everything was ok. When I put the script on the UNIX server and run it I get blocks on my excel sheet where new lines occurred. How can I have the UNIX Perl write out Microsoft new line characters so

RE: Spreadsheet::WriteExcel - Unix New line

2003-01-16 Thread Dan Muey
- Unix New line I wrote a script that generates an excel file. I tested it on a windows xp pro machine and everything was ok. When I put the script on the UNIX server and run it I get blocks on my excel sheet where new lines occurred. How can I have the UNIX Perl write out Microsoft new line

Where is the new line coming from.

2003-01-16 Thread Paul Kraus
I am reading in a text file that has input similar to this. date|data|data|data\n I then read the file in and using a while loop I chomp off the new line. while (IPO){ chomp; @line=split /\|/,$_; $line[2]=~s/ //g; print $_ foreach (@line); last; $count++; last

RE: Where is the new line coming from.

2003-01-16 Thread Dan Muey
I am reading in a text file that has input similar to this. date|data|data|data\n I then read the file in and using a while loop I chomp off the new line. while (IPO){ chomp; @line=split /\|/,$_; $line[2]=~s/ //g; Do you mean $line[3] since that is the last one in the array

RE: Where is the new line coming from.

2003-01-16 Thread Paul Kraus
any of the array elements when printed act as if they have a new line. So it would be the last array element printed. In the case it could be 3 but it could also be 2 or 4. -Original Message- From: Dan Muey [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 2003 10:49 AM To: Paul

RE: Where is the new line coming from.

2003-01-16 Thread Dan Muey
any of the array elements when printed act as if they have a new line. So it would be the last array element printed. In the case it could be 3 but it could also be 2 or 4. Then do a froeach loop on each item in the array replacing \n's and \r's and spaces( if you want to kill space

RE: Where is the new line coming from.

2003-01-16 Thread Paul Kraus
PROTECTED]] Sent: Thursday, January 16, 2003 10:49 AM To: Paul Kraus; Perl Subject: RE: Where is the new line coming from. I am reading in a text file that has input similar to this. date|data|data|data\n I then read the file in and using a while loop I chomp off the new line. while

RE: Where is the new line coming from.

2003-01-16 Thread Paul Kraus
attached is a copy of the excel file if it helps. -Original Message- From: Paul Kraus [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 2003 11:03 AM To: 'Dan Muey'; 'Perl' Subject: RE: Where is the new line coming from. come to think of it. This newline I am getting must

Re: Where is the new line coming from.

2003-01-16 Thread Rob Dixon
Paul Kraus wrote: attached is a copy of the excel file if it helps. Paul You have CRLF at the end of the line. chomp will only remove the LF. Try s/[[:cntrl:]]$//g; instead of chomp. HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: Where is the new line coming from.

2003-01-16 Thread Dan Muey
. Try that and see. Dan -Original Message- From: Paul Kraus [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 2003 11:03 AM To: 'Dan Muey'; 'Perl' Subject: RE: Where is the new line coming from. come to think of it. This newline I am getting must be a result

RE: Where is the new line coming from.

2003-01-16 Thread Paul Kraus
from? -Original Message- From: Dan Muey [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 2003 11:22 AM To: Paul Kraus; Perl Subject: RE: Where is the new line coming from. attached is a copy of the excel file if it helps. I see it now. It's probably some odd

RE: Where is the new line coming from.

2003-01-16 Thread Dan Muey
that. -Original Message- From: Dan Muey [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 2003 11:22 AM To: Paul Kraus; Perl Subject: RE: Where is the new line coming from. attached is a copy of the excel file if it helps. I see it now. It's probably some

Re: Where is the new line coming from.

2003-01-16 Thread Rob Dixon
Paul Kraus wrote: Interesting When I run the script on my windows box (5.6.1) I get this output DEBUG : NON PRINT ACHAR -011747- DEBUG : NON PRINT ACHAR -Eco-Liner w/Att A=30-35 B=23-29cm - DEBUG : NON PRINT ACHAR -139.45- Same script same source file run on sco

RE: Where is the new line coming from.

2003-01-16 Thread Dan Muey
Paul Kraus wrote: Interesting When I run the script on my windows box (5.6.1) I get this output DEBUG : NON PRINT ACHAR -011747- DEBUG : NON PRINT ACHAR -Eco-Liner w/Att A=30-35 B=23-29cm - DEBUG : NON PRINT ACHAR -139.45- Same script same source file run

RE: Spreadsheet::WriteExcel - Unix New line

2003-01-16 Thread Jenda Krynicky
tested it on a windows xp pro machine and everything was ok. When I put the script on the UNIX server and run it I get blocks on my excel sheet where new lines occurred. How can I have the UNIX Perl write out Microsoft new line characters so that the excel sheet looks normal? You need

Embarassing new line char

2002-12-15 Thread Patricia Hinman
to reinstall perl to get it to remove the new line? In one of my other files while writing it printed out a square box for a newline character that I was trying to remove. Has anyone had this happen? Thanks, Tricia __ Do you Yahoo!? Yahoo! Mail

Re: Embarassing new line char

2002-12-15 Thread John W. Krahn
; } my($printcap) = join(|,@caption); $printcap=~ s/\n//g; print CAP $printcap;} Quoting a scalar variable is almost always unnecessary. close(CAP); Output: Variety Story |Local Church |Local Fairgrounds |Bellys full Do I have to reinstall perl to get it to remove the new line

how can i get rid of these new line characters?

2002-10-04 Thread s wang
i have just started writing some scripts in PERL and i am trying to catch a deadline, i really wish i could get some help for this problem. any suggestion is greatly appreciated. i have a set of files with sequences aligned in the following format. i wonder how i can eliminate the new line

Re: how can i get rid of these new line characters?

2002-10-04 Thread Prachi Shah
. Original Message Follows From: s wang [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: how can i get rid of these new line characters? Date: Fri, 4 Oct 2002 08:00:19 -0700 (PDT) i have just started writing some scripts in PERL and i am trying to catch a deadline, i really wish i could

RE: how can i get rid of these new line characters?

2002-10-04 Thread nkuipers
Follows From: s wang [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: how can i get rid of these new line characters? Date: Fri, 4 Oct 2002 08:00:19 -0700 (PDT) i have just started writing some scripts in PERL and i am trying to catch a deadline, i really wish i could get some help

Re: how can i get rid of these new line characters?

2002-10-04 Thread Jeff 'japhy' Pinyan
eliminate the new line characters within each sequence without touching those between sequences? I think the easiest way is to read in a line, then read the next line. If the next line is NOT \n, then remove the last character from the previous line: open DNA, dna.txt or die can't read dna.txt

Re: how can i get rid of these new line characters?

2002-10-04 Thread Jeff 'japhy' Pinyan
eliminate the new line characters within each sequence without touching those between sequences? Heh, a much simpler way is: open DNA, dna.txt or die can't read dna.txt: $!; open NEW_DNA, dna.txt.new or die can't write dna.txt.new: $!; { local $/ = ; while (DNA) { chomp; # get

Re: how can i get rid of these new line characters?

2002-10-04 Thread James Edward Gray II
for this problem. any suggestion is greatly appreciated. i have a set of files with sequences aligned in the following format. i wonder how i can eliminate the new line characters within each sequence without touching those between sequences? . 2 chr1 10761 10775 chr19 46520370 46520384 + 941

Re: how can i get rid of these new line characters?

2002-10-04 Thread James Edward Gray II
eliminate the new line characters within each sequence without touching those between sequences? . 2 chr1 10761 10775 chr19 46520370 46520384 + 941 acaGGGAACAA acagggaaggg 3 chr1 10776 11241 chrUn 45411478 45411944 - 12857

RE: how can i get rid of these new line characters?

2002-10-04 Thread Bob Showalter
-Original Message- From: s wang [mailto:[EMAIL PROTECTED]] Sent: Friday, October 04, 2002 11:00 AM To: [EMAIL PROTECTED] Subject: how can i get rid of these new line characters? i have just started writing some scripts in PERL and i am trying to catch a deadline, i really

Re: how can i get rid of these new line characters?

2002-10-04 Thread John W. Krahn
eliminate the new line characters within each sequence without touching those between sequences? . 2 chr1 10761 10775 chr19 46520370 46520384 + 941 acaGGGAACAA acagggaaggg 3 chr1 10776 11241 chrUn 45411478 45411944 - 12857

RE: a new line?

2001-10-01 Thread Bob Showalter
-Original Message- From: Gareth Londt [mailto:[EMAIL PROTECTED]] Sent: Monday, October 01, 2001 10:54 AM To: [EMAIL PROTECTED] Subject: a new line? i need to know where to put a new line in.i keep getting errors..? here is what the code looks like, if anyone can

RE: defining a new line seperator

2001-07-04 Thread mark crowe (JIC)
perlvar for a better explanation. Cheers Mark C $/ is the var for this, so you should say: $/=\n\n; have a nice day. On Tue, 3 Jul 2001 [EMAIL PROTECTED] wrote: i'd like to define a new line separator as a simple blank line. i have tried \n\n and even tried ^$ in the way

defining a new line seperator

2001-07-03 Thread charles
i'd like to define a new line separator as a simple blank line. i have tried \n\n and even tried ^$ in the way of a regex, but to no avail. is there a metacharacter specific to this? -cjm

Re: defining a new line seperator

2001-07-03 Thread Pozsar Balazs
$/ is the var for this, so you should say: $/=\n\n; have a nice day. On Tue, 3 Jul 2001 [EMAIL PROTECTED] wrote: i'd like to define a new line separator as a simple blank line. i have tried \n\n and even tried ^$ in the way of a regex, but to no avail. is there a metacharacter specific

Re: NEW LINE

2001-06-11 Thread Me
Can anyone send me any solution to read the paragraph from a text file? To read paragraphs (delimited by one or more blank lines (really blank, no spaces or tabs)), change the record separator from its default (newline) to the null string (''). $/ = ''; while () { print;

NEW LINE

2001-06-11 Thread arvind Bir
CAn any one suggest a pattern for checking the newline character at the end of line? Problem:Actually the requirement is that I want to read no. of lines by comparing the newline character which will tell that this is the end of paragraph? Can anyone send me the code for this or any

Re: NEW LINE

2001-06-11 Thread Jos Boumans
That code is a bit tricky, since you're now changing the behaviour of $/ throughout the entire file A bit safer way to do this would be the following: open I, yourfile.txt;#open a textfile for reading { local $/;#undef $/, which is essentially the same as $/ =

Re: NEW LINE

2001-06-11 Thread Me
A bit safer way to do this would be the following: Jos is right in principle, but wrong in one detail. Setting $/ to undef isn't the same as setting it to ''. Setting it to undef makes the input operator slurp the whole file.

Re: New line in Regular expression.

2001-05-23 Thread Timothy Kimball
: this is what i tryed on the command prompt. : : perl -pi -e 's{^!--\ntd}{test}' hello.txt : : but this command is not working .. so anybody kindly please help me in getting a :regular expression for this. Two things: 1. The -p flag by itself will only read in one line of hello.txt at a