PerlIsFun

i have simple log file on my PC. it is as below:


PeopleSoft Project Command Line Copy To File Project Name: PT_TEST_STAT_EXP Tools Release: 8.49.24 2010-11-22 : 16.00.29 -CT Source Database Type = ORACLE -CD Source Database Name = PSQSTG -CO Source Database Operator = PSAPI -FP File Path = Q:\Salem_RE\csr_export -AF Keep Target Audit Flags = 0 -DDL Keep Target DDL = 1 -CFD Keep Target Chartfield PageField Display Size = 0 -CFF Keep Target Chartfield DbField Format = 0 -PPL Keep Target Portal Structure Permission List = 0 Project Q:\Salem_RE\csr_export\PT_TEST_STAT_EXP already exists, contin +uing processing, switch set to overwrite. Records Application Upgrade Copy started: 2010-11-22-16.00.30 Records Application Upgrade Copy ended: 2010-11-22-16.00.30 Fields Application Upgrade Copy started: 2010-11-22-16.00.30 Fields Application Upgrade Copy ended: 2010-11-22-16.00.30 Saving Project Definition... Saving Project Definition...Complete. Command line process successfully completed.

It looks normal via notepad or wordpad. I wrote a very simple script to just print this file out. Following is what i got:


P e o p l e S o f t P r o j e c t C o m m a n d L i n e C o p y T o F i l e P r o j e c t N a m e : P T _ T E S T _ S T A T _ E X P T o o l s R e l e a s e : 8 . 4 9 . 2 4 2 0 1 0 - 1 1 - 2 2 : 1 6 . 0 0 . 2 9 - C T S o u r c e D a t a b a s e T y p e = O R A C L E - C D S o u r c e D a t a b a s e N a m e = P S Q S T G - C O S o u r c e D a t a b a s e O p e r a t o r = P S A P + I - F P F i l e P a t h = Q : \ S a l e m _ R E \ c s r _ e x p + o r t - A F K e e p T a r g e t A u d i t F l a g s = 0 - D D L K e e p T a r g e t D D L = 1 - C F D K e e p T a r g e t C h a r t f i e l d P a g e F i e + l d D i s p l a y S i z e = 0 - C F F K e e p T a r g e t C h a r t f i e l d D b F i e l d + F o r m a t = 0 - P P L K e e p T a r g e t P o r t a l S t r u c t u r e P + e r m i s s i o n L i s t = 0 P r o j e c t Q : \ S a l e m _ R E \ c s r _ e x p o r t \ P T _ T + E S T _ S T A T _ E X P a l r e a d y e x i s t s , c o n t i +n u i n g p r o c e s s i n g , s w i t c h s e t t o o v e + r w r i t e . R e c o r d s A p p l i c a t i o n U p g r a d e C o p y s t + a r t e d : 2 0 1 0 - 1 1 - 2 2 - 1 6 . 0 0 . 3 0 R e c o r d s A p p l i c a t i o n U p g r a d e C o p y e n + d e d : 2 0 1 0 - 1 1 - 2 2 - 1 6 . 0 0 . 3 0 F i e l d s A p p l i c a t i o n U p g r a d e C o p y s t a + r t e d : 2 0 1 0 - 1 1 - 2 2 - 1 6 . 0 0 . 3 0 F i e l d s A p p l i c a t i o n U p g r a d e C o p y e n d + e d : 2 0 1 0 - 1 1 - 2 2 - 1 6 . 0 0 . 3 0 S a v i n g P r o j e c t D e f i n i t i o n . . . S a v i n g P r o j e c t D e f i n i t i o n . . . C o m p l e t + e . C o m m a n d l i n e p r o c e s s s u c c e s s f u l l y c + o m p l e t e d .

perl guru, take look at my code. where i can go wrong?

Thanks,

#!perl open(F, "<", "C:\\TEMP\\PT_TEST_STAT_EXP_export.log"); while ( <F> ) { print "$_"; } close(F);

In reply to perl read a file on Windows is very strange by perlisfun

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.