Gossamer Forum
Home : General : Perl Programming :

Am I going mad?

Quote Reply
Am I going mad?
Please tell me this is something stupid. Its driving me mad :(

Code:
#!/usr/bin/perl

use strict;

use lib '/home/linkssql/public_html/cgi-bin/admin';
use Links qw/$IN $DB $CFG/;
use CGI::Carp qw(fatalsToBrowser);

Links::init('/home/linkssql/public_html/cgi-bin/admin');

my $data;
open(GRAB, "NET_data.txt") || die "Error reading NET_data.txt. Reason: $!";
while (<GRAB>) {

my $_hash;
my @cut = split /\t/, $_;

$_hash->{Title} = $cut[0];

print $cut[0] . "\n";

#$DB->table('Links')->add( $_hash ) or die $GT::SQL::error

}
close(GRAB);

... when running, all it does is give me a blank return;

Quote:
jailshell-2.05a$ perl xml_import.cgi
jailshell-2.05a$

Any ideas guys and gals? This has me stumped Frown

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!