Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: from $string to shining $string

by AidanLee (Chaplain)
on Mar 21, 2002 at 14:32 UTC ( #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? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2022-05-22 12:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (80 votes). Check out past polls.

    Notices?