#!/usr/bin/perl -w use strict; use Symbol; my $sym = gensym; open($sym, 'file1') || die "Can't $!"; while(readline($sym)){ print; }