in reply to Re: Error Undefined subroutine &main::OPEN called at C:\Perl\sku_corr2.pl line 8.
in thread Error Undefined subroutine &main::OPEN called at C:\Perl\sku_corr2.pl line 8.
#!/usr/bin/perl -w use strict; $| = 1; my $myfile = "apr_products_tab.csv"; my $newfile = "./sku.txt"; open (myfile, "$myfile") || die "Cannot open $myfile, aborting program +."; open (newfile, "> $newfile") || die "Cannot open sku.txt, aborting pro +gram. $!\n"; while (<myfile>) { chomp; my ($_ID,$CAT_ID,$TITLE,$SHORT_DESC,$FULL_DESC,$META_TITLE,$META_K +EYWORDS,$META_DESCRIPTION,$THUMB_IMAGE,$DETAIL_IMAGE,$LARGE_IMAGE,$LI +ST_PRICE,$PRICE,$SALE_PRICE,$FLAT_RATE_SHIPPING,$IN_STOCK,$NUM_SOLD,$ +WEIGHT,$BOX_LENGTH,$BOX_WIDTH,$BOX_HEIGHT,$MAX_PER_BOX,$CHARGE_SHIPPI +NG,$REALTIME_OVERRIDE,$CHARGE_TAX,$IS_NEW,$IS_FEATURED,$SHIP_SEPERATL +Y,$VIEWABLE,$ORDERABLE,$REWARDS_EARNABLE,$REWARDS_REDEEMABLE,$REQUIRE +_ADDTOCART,$AVAIL_TO,$MANUFACTURER,$VENDOR,$SKU) = split (/\t/, $_, 37); print newfile $SKU . "\n"; } close myfile; close newfile;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Error Undefined subroutine &main::OPEN called at C:\Perl\sku_corr2.pl line 8.
by Marshall (Canon) on May 10, 2011 at 15:05 UTC | |
|
Re^3: Error Undefined subroutine &main::OPEN called at C:\Perl\sku_corr2.pl line 8.
by cmac (Monk) on May 10, 2011 at 08:42 UTC | |
|
Re^3: Error Undefined subroutine &main::OPEN called at C:\Perl\sku_corr2.pl line 8.
by Anonymous Monk on May 10, 2011 at 02:38 UTC |