Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: delete FF's from a file

by james28909 (Deacon)
on Feb 11, 2013 at 09:41 UTC ( [id://1018118]=note: print w/replies, xml ) Need Help??


in reply to Re: delete FF's from a file
in thread delete FF's from a file

so i can open with filehandle "infile" without "$"?
yes, it is a dump from hardware, but i guess you could call it plain text as it can be opened in notepad but has wild characters.
i tried many different variations of $file =~ and nothing would work out.
i am fixing to read up on the link that was posted earlier.
thanks for all the help

Replies are listed 'Best First'.
Re^3: delete FF's from a file
by tmharish (Friar) on Feb 11, 2013 at 10:14 UTC
    so i can open with filehandle "infile" without "$"?

    You CAN but there are good some very good reasons not to.

    You will notice from the last link above the "Modern Perl", Recommended by Anonymous Monk below, does not use it.

    At the end of the day its a choice that you make but I disagree with igelkott on this.

    To differentiate you could always call it $input_file_handle or similar.

      filehandle "infile" without "$"

      I don't have an evidence to support my claim of "usually" but maybe that's not relevant anyway. Of course it's possible to use and I didn't mean to imply that it was wrong. There were just so many things that looked "odd" to me.

        There were just so many things that looked "odd" to me.

        Yup! I see what you mean. :-)

Re^3: delete FF's from a file
by Anonymous Monk on Feb 11, 2013 at 09:47 UTC

    FWIW, you should binmode if you want to treat your binary files as binary ( no newline translation )

    with open it would be  open my($infile), '<:raw', ... or die ...

    While you're in a learning mood, get a free copy of Modern Perl book, a loose description of how experienced and effective Perl 5 programmers work....You can learn this too.</b.

      yes yes, i did use binmode. thanks for the tips as well :)
Re^3: delete FF's from a file
by james28909 (Deacon) on Feb 11, 2013 at 09:46 UTC
    i have def bookmarked this site
    this seems to be the place i can learn alot from
    i will make me a spot in the corner
    you wont even know im here
    ;D

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1018118]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-19 15:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found