Hello Emeka,

$/ is the input record separator. This variable holds a newline by
default. When you read records from a file handle, $/ holds the record
delimiter.

e.g Usually, you only read one line at a
time from a file, but if you undefine $/, you can read in a whole,
multiline file at once:

################# your script ###############

#!/usr/bin/perl -w
use strict;

undef $/;
open HANDLE, "file.txt";
my $text =<HANDLE>;
print $text;

#################### your file.txt #############
Here 's
text from
a file.


$\ holds the output record separator for the print operator. Usually,
this is a null string, but you can place text in it like this:
$\ - "END_0F_0UTPUT";
print "Hello!";
Hello!END_0F_0UTPUT

 Try to also check out perldoc perlvar documentation.

Reply via email to