velocitymodel has asked for the wisdom of the Perl Monks concerning the following question:
Every time I try to run this code I get a syntax error at my. Does the file type matter when using the open command? I understand my code probably has more errors but a little help getting past this first error would be greatly appreciated.#!/usr/bin/perl -w open (my $SELECT.DAT2, '<', $ARGV[0]) || die "cannot open for reading, + $ ! "; open (my $OUT, '>', $ARGV[0]) || die "cannot open for writing, $ ! "; printf $OUT "NO" "\n", " 'SOURCE' ", "SEC", "Q", "SEC", "\n", "LONG", +"LAT", "DEPTH", "GAP"; close ($SELECT.DAT2); close ($OUT);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Format file
by ikegami (Patriarch) on Jan 21, 2011 at 22:21 UTC | |
by cdarke (Prior) on Jan 22, 2011 at 05:56 UTC | |
|
Re: Format file
by toolic (Bishop) on Jan 21, 2011 at 22:30 UTC |