<br><font size=2 face="sans-serif">Nothing super sneaky, I just prefer
the OO interfaces. &nbsp;This just uses join.</font>
<br>
<br><font size=2 face="sans-serif">use strict;</font>
<br><font size=2 face="sans-serif">use IO::File;</font>
<br>
<br><font size=2 face="sans-serif">{</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; my $fh = new IO::File
'Colours.xml';</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; my $file = join '', $fh-&gt;getlines;</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; print $file;</font>
<br><font size=2 face="sans-serif">}</font>
<br><font size=2 face="sans-serif"><br>
---<br>
Rick Croote<br>
Software Engineer<br>
Environment and Tools Team<br>
Philips Medical Systems<br>
Bothell, WA<br>
Rick.Croote@Philips.com<br>
Phone: 425-487-7834<br>
</font>
<br><font size=1 color=#800080 face="sans-serif">----- Forwarded by Rick
Croote/ATL-BTL/MS/PHILIPS on 2005-07-20 06:44 PM -----</font>
<br>
<br><font size=2><tt>spug-list-bounces@pm.org wrote on 2005-07-20 06:24:49
PM:<br>
<br>
&gt; I just found this, is this the best practice?<br>
&gt; <br>
&gt; while ( &lt;COLOURS&gt; )<br>
&gt; {<br>
&gt; &nbsp; $myfile = $myfile . $_;<br>
&gt; }<br>
&gt; <br>
&gt; Duane<br>
&gt; <br>
&gt; On 7/20/05, Duane Blanchard &lt;dblanchard@gmail.com&gt; wrote:<br>
&gt; &gt; Hi gang,<br>
&gt; &gt; <br>
&gt; &gt; I'm too tired to think straight and too tired to keep looking
on the<br>
&gt; &gt; 'Net. I want to match things like 'line\s+that' in the example
file<br>
&gt; &gt; below.<br>
&gt; &gt; <br>
&gt; &gt; &lt;file&gt;<br>
&gt; &gt; this is a line<br>
&gt; &gt; that is a line<br>
&gt; &gt; &lt;/file&gt;<br>
&gt; &gt; <br>
&gt; &gt; What has worn me out today is not realizing that I'll never match<br>
&gt; &gt; across lines of a file if I only read one line at a time. So,
I either<br>
&gt; &gt; need a clever way to match across elements of an array or hash
table,<br>
&gt; &gt; or (more likely) to read the whole file into a scalar. As I recall,<br>
&gt; &gt; I'll use the 'm' flag to hand the RE more than one line, and
'\s'<br>
&gt; &gt; should handle '\n'.<br>
&gt; &gt; <br>
&gt; &gt; Someone, please give a little pointer. Thanks,<br>
&gt; &gt; <br>
&gt; &gt; D<br>
&gt; &gt; --<br>
&gt; &gt; Duane Blanchard<br>
&gt; &gt; 206.934.5873<br>
&gt; &gt; <br>
&gt; &gt; There are 10 kinds of people in the world;<br>
&gt; &gt; those who know binary and those who don't.<br>
&gt; &gt; _____________________________________________________________<br>
&gt; &gt; Seattle Perl Users Group Mailing List<br>
&gt; &gt; &nbsp; &nbsp; POST TO: spug-list@pm.org<br>
&gt; &gt; SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list<br>
&gt; &gt; &nbsp; &nbsp;MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med<br>
&gt; &gt; &nbsp; &nbsp;WEB PAGE: http://seattleperl.org/<br>
&gt; &gt; <br>
&gt; <br>
&gt; <br>
&gt; -- <br>
&gt; Duane Blanchard<br>
&gt; 206.934.5873<br>
&gt; <br>
&gt; There are 10 kinds of people in the world;<br>
&gt; those who know binary and those who don't.<br>
&gt; _____________________________________________________________<br>
&gt; Seattle Perl Users Group Mailing List &nbsp;<br>
&gt; &nbsp; &nbsp; &nbsp;POST TO: spug-list@pm.org<br>
&gt; SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list<br>
&gt; &nbsp; &nbsp; MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med<br>
&gt; &nbsp; &nbsp; WEB PAGE: http://seattleperl.org/<br>
</tt></font>