Re: what's wrong

2002-08-15 Thread Priss
I may sound stupid, how do I output the results without having to do a control-D in the middle of the program running -> how do I open these files explicitly? Many thanks Priss __ Do You Yahoo!? Everything you'll ever need on one web p

Re: what's wrong

2002-08-15 Thread Priss
I have amended the first few lines, this works but I wonder if this bad... Priss while (<>) { /(\S+)/ and $seen_in_file1{$1} += 1; push @tmp, $_; } open (FILE, @tmp); while () --- Priss <[EMAIL PROTECTED]> wrote: > > > # comp

Remove elements in an array from a different array

2002-08-21 Thread Priss
Hello, I am very new to Perl, wonder if someone can help me with this... if I have: @arr1 = qw (one two three four five); @arr2 = qw (two four); How can I remove all elements from @arr2 from @arr1 so the new array will be @newarr = (one three five)?? Many thanks. Priss

problem with foreach and while with array

2002-08-28 Thread Priss
/) { ($host) = $_ =~ /\d+\s+1D\s+IN\s+\PTR\s+(.+).this.is.my.domain./; push (@all_hosts, $host); } } close (DIG); last SOA; } } } close(SOA); } print "@all_hosts\n

Re: problem with foreach and while with array

2002-08-28 Thread Priss
Thank you Connie for helping me on this, it was fixed by below comment you made :))) >> SOA: while () >> { >> chomp; > >You don't need to chomp it, or you don't need $/ at >last of the next line. Priss __

get a list into array from a remote machine

2002-09-06 Thread Priss
Hiya, Wonder if someone can correct me, I am trying to get a list into an array from a file on a remote machine. For some reason, it didn't work: @array = `/usr/local/bin/ssh -l priss remotehost "open(FILE,"/home/priss/list-txt"); @arr1 = ;

RE: get a list into array from a remote machine

2002-09-06 Thread Priss
Thank you Jeff, it does work :)) But for some reason, it tells me permission denied when it tries to read the remote file even though I can view it by ssh onto it manually... Priss --- Jeff AA <[EMAIL PROTECTED]> wrote: > > Try > > @lines = `/usr/local/bin/ssh -l pris

Installing DBD::mysql without installing mysql on local machine

2002-09-20 Thread Priss
s? Do you know where I can get them? The version of mysql installed on the remote machine is 3.22.25. Many thanks in advance. Priss __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts ht

Re: file upload to MySql

2002-09-21 Thread Priss
You mean something like this? use DBI; $dbh = DBI->connect("DBI:mysql:database=mydatabase;host=localhost", "user", "password", {'RaiseError' => 1}); $sth = $dbh->prepare("LOAD DATA INFILE '/home/me/file' INTO TABLE mytable FI

Re: file upload to MySql

2002-09-21 Thread Priss
Sorry, a bit messy... use DBI; $dbh = DBI->connect("DBI:mysql:database=mydatabase;host=localhost", "user", "password", {'RaiseError' => 1}); $sth = $dbh->prepare("LOAD DATA INFILE '/home/me/file' INTO TABLE mytable FIELDS