in reply to Re: Sybase BCP date formatter
in thread Sybase BCP date formatter

Being very new to Perl, How is a bcp file called to this script?

Replies are listed 'Best First'.
Re^3: Sybase BCP date formatter
by runrig (Abbot) on Dec 16, 2008 at 17:07 UTC
    It's not a full script, it's just a function to put into other programs. Call the function with the name of the file to "fix".
      Sorry, I only know Korn Shell... Could you provide an example as I have an immediate need for a solution to my bcp output file issue. Any help would be extremely appreciate. Thx Rob
        Create this program and fill in with jwkrahn's code above (untested):
        #!/usr/bin/perl use strict; use warnings; { # Put jwkrahn's code here } for my $file (@ARGV) { fix_bcp_file($file); }
        Call this program with the names of the bcp files you want to fix as arguments. If you want to create a backup of your original files, then change this line:
        local ( $^I, @ARGV ) = ( '', $file );
        to something like this:
        local ( $^I, @ARGV ) = ( '.bak', $file );