Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: from $string to shining $string

by AidanLee (Chaplain)
on Mar 21, 2002 at 14:32 UTC ( [id://153328]=note: print w/replies, xml ) Need Help??


in reply to from $string to shining $string

The easiest way is to locally re-set your record separator. Normally this is set to newline, but you can set it to anything you like:
my @quotes = (); if( open(FILE,$myfile) ) { local $/ = '%'; @quotes = <FILE>; close FILE; } else { print "oops, i need to check why the file didn't open..."; }

Replies are listed 'Best First'.
Re: Re: from $string to shining $string
by gellyfish (Monsignor) on Mar 21, 2002 at 14:59 UTC

    print "oops, i need to check why the file didn't open...";

    Of course if you had printed the value of $! you wouldn't need to check why ;-}

    /J\

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-24 00:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found