I think the problem might be your while loop. You don't need the "$line =" bit. The diamond operator should only be around the file handle like (<LGFILE>).
Hope this helps. Kind regards, Trevor J. Joerges -------------------------------------------- $_=q;rrUSFWPSZK.ZKPFSHFT,rkvtuZbopuifsZQZibdl rrqpxfsfeZcyZQ,,riuuq://xxx.%.dpn,ru~@%.dpn ,rrr8-) ;;s;\~;kpfshft;g;s;\%;tfoenjnf;g;y;B-x;A-w;; s;P;perl;g;s;,;\n;g;s;Y; ;g;s;q;\t;g;print; -------------------------------------------- ----- Original Message ----- From: "jack martin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, April 09, 2002 3:05 PM Subject: (no subject) | trouble with printing to file | Hi | I'm fairly new to perl | | I'm trying to identify duplicates in two sets of data | in a file and write out unique values to another file. | I'm running into a problem in the code which is | reporducible in the piece of code below also . this | code is written to demo only | | | $Name = "logfile.txt"; | open(LGFILE,"> $Name") or die " Could not open | $Name\n" ; | #seed some data into the file | print LGFILE "vbvbe\n"; | while ($line =<LGFILE>) | | { | print LGFILE "vbvbe\n"; | } | close (LGFILE); | | | The output i get in the logfile is | | vbvbe | ]n" ; | | vbvbe | LGFILE "vbvbe\n"; | | vbvbe | ($line =<LGFILE>) | | vbvbe | rint LGFILE "vbvbe\n"; | | vbvbe | se (LGFILE); | | vbvbe | | Any tips on what is happening here? | | | __________________________________________________ | Do You Yahoo!? | Yahoo! Tax Center - online filing with TurboTax | http://taxes.yahoo.com/ | _______________________________________________ | Perl-Win32-Admin mailing list | [EMAIL PROTECTED] | To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs | _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs