Operating System - Microsoft
1752793 Members
6234 Online
108789 Solutions
New Discussion юеВ

Why am I getting /par in my perl program output

 
Omar Alvi_1
Super Advisor

Why am I getting /par in my perl program output

Hi,

I have perl program whereI'm searching a file for certain lines and extracting a report.

The program is simple. I'm taking each line as input and matching whether it has what concerns me. The I split the line and feed it into an array and extract the particular array element.

For testing puproses,my input file is a .rtf file. Anyway, whenever the array element is the last in the line, it is suffixed with a /par in the output.

What does this mean. I tried chomp and chop before feeding the array, but no use there.

Looking forward to your support.

Thanks and Regards,

-Alvi
3 REPLIES 3
Omar Alvi_1
Super Advisor

Re: Why am I getting /par in my perl program output

Hi,

I changed test format and used plain text. The /par doesn't occur anymore. Seems like something to do with a dfferent paragraph.

Regards,

-Alvi
Steven E. Protter
Exalted Contributor

Re: Why am I getting /par in my perl program output

Shalom,

Your program is picking up codes in the rtf document.

If you want someone to help you fix your code, please provide it.

chomp and chop are fun to play with in perl and sometimes do not act as expected.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: Why am I getting /par in my perl program output

Hi:

> SEP: If you want someone to help you fix your code, please provide it.

Yes, that would be very smart.

> SEP: chomp and chop are fun to play with in perl and sometimes do not act as expected.

Expletive deleted here. Perl's 'chop' and 'chomp' do _exactly_ what they are intended to do. It's the user's lack of understanding that causes unexpected behavior.

Regards!

...JRF...