Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: liuwt
  • Order by date
  1. liuwt

    A piece of cake.

    Hi, I can see you have really forgotten Perl ;-) Try this: #!/usr/bin/perl open(FILE,&quot;data.txt&quot;); // data.txt is a flat file. I only want to read it's contents. @content=<FILE>; close(FILE); @cY=(); foreach(@content) { @tmp = split (//, file); push(@cY,@tmp); } // cY is a...
  2. liuwt

    Finding files in a specific directories

    Hi, try this: $dir=specified_directory @a_files=<$dir/*.a>; foreach(@files) { system(&quot;ar ..options.. $_&quot;); #I don't know ar, therefore don't know which options to use } $OUTPUT_DIR=..blabla.. @o_files=<$OUTPUT_DIR/*.o>; #$OUTPUT_DIR is where ar saves those decompressed files...
  3. liuwt

    Record exists?

    Hi, why don't you use &quot;Select&quot; and see if it returns the entry? Greetings -- Smash your head on keyboard to continue...
  4. liuwt

    How do I prohibit user from unwanted &quot;USE &lt;db&gt;&quot;?

    Hi SantaMufasa, are you sure that &quot;yada&quot; doesn't exist in the &quot;user&quot;-table of &quot;mysql&quot;-database anymore, that is, completely erased? Has someone made changes to the mysql-db within these hours? Greetings -- Smash your head on keyboard to continue...
  5. liuwt

    help- retrieving multiple select items print to email with perl

    Hi, I would recommend you to use the CGI-module. Just: use CGI; $cgi=CGI->new(); @selected_items=$cgi->param('my_multiple_select'); foreach(@selected_items) { ...blabla... } Hope that helps -- Smash your head on keyboard to continue...
  6. liuwt

    File Uploading Problems

    Hi, have you tried pressing the &quot;refresh&quot;-button in your browser? Greetings -- Smash your head on keyboard to continue...
  7. liuwt

    Learning MYSQL, following steps from a book and have run into an error

    Hi, i see that there is no password for the root if you connect from localhost. Maybe you should change it. Also, accounts with blank usernames are risky for system security, I would delete them. Greetings -- Smash your head on keyboard to continue...
  8. liuwt

    Split a line and only print up to a certain point

    Hi, Try this: foreach $mystuff (@filesfound) { $mystuff=~/([^\/]+)$/; print &quot;\t$1\n&quot;; } Greetings -- Smash your head on keyboard to continue...
  9. liuwt

    mkdir()

    Hi, eventhough under Windows the mode is not interesting, it must be supllied with mkdir(). Greetings -- Smash your head on keyboard to continue...
  10. liuwt

    Newbie question

    Hi, not: TO MyUserName@localhost but instead: TO MyUserName@% (for all remote hosts, excludes localhost) --or-- TO MyUserName@xxx.xxx.xxx.xxx (for a specified ip) Also i'm not sure wether it works on the commandline, because i personally always did it inside mysql, but just try it out as you...
  11. liuwt

    Newbie question

    Hi, per default, the root is only allowed to login a mysql-system from localhost. If you are sure you want to login as root remotely (which is a bad idea), use: grant all on *.* to root@% identified by &quot;<password>&quot;; But I would recommend you to use another account. Greetings --...
  12. liuwt

    mysql with perl

    correction: not: $sth=$dbh->prepare(&quot;SELECT * FROM test&quot;); but: $sth=$dbh->prepare(&quot;SELECT something FROM test&quot;); because thats easier for the &quot;print $_;&quot; below. Greetings -- Smash your head on keyboard to continue...
  13. liuwt

    mysql with perl

    Hi, use DBI; $dbh=DBI->connect(&quot;dbi:mysql:database=test&quot;,&quot;user&quot;,&quot;password&quot;); $dbh->do(&quot;INSERT INTO sometable(column) VALUES(value)&quot;); $sth=$dbh->prepare(&quot;SELECT * FROM test&quot;); $sth->execute(); while($sth->fetchrow_array()) { print $_; }...
  14. liuwt

    Correct Use of Length Function

    Yes, thats the problem, because you chomped it off before you check it, therefore there were only 1312 characters left. But still look out for the endless loop problem! Greetings -- Smash your head on keyboard to continue...
  15. liuwt

    Regex not matching basec word? :'(

    @coderifous: Ohh...yes, you are right...shame on me, what I told is wrong...Soorrryy!!! :-( -- Smash your head on keyboard to continue...
  16. liuwt

    Correct Use of Length Function

    Also, your program wouldn't terminate if there is a line with 1313 characters, look at this endless loop: while (length($line) == 1313){ print OUTPUTFILE $line; } Greetings -- Smash your head on keyboard to continue...
  17. liuwt

    Correct Use of Length Function

    Hi, are you sure that in '/u02/35bad.dat' at least one line has ecxatly 1313 characters without the &quot;\n&quot;? If not, it's no wondering that nothing will be printed. Also, is this a text file or binary file? Does it run under Windows or Liunx? Greetings -- Smash your head on keyboard...
  18. liuwt

    How do I prohibit user from unwanted &quot;USE &lt;db&gt;&quot;?

    Hi, I found the problem: It seems that revoke doesn't exactly work as I thought on the newer versions of MySql(It doesn't delete the account). Try instead deleting the user yada manually with(as root): use mysql; delete from user where user=&quot;yada&quot;; delete from db where...
  19. liuwt

    How to get variables of main program in a module?

    Hi arn0ld, could please nearer explain it? I thought @ARGV is only used for reading from the command line, or am I false? Greetings -- Smash your head on keyboard to continue...
  20. liuwt

    Regex not matching basec word? :'(

    Hi, i had tried your script (but maybe what i'm now going to say is totally shi**) foreach (@RULES) { print &quot;Word: $_ <BR>&quot;; if ($html =~ /$_/sig) { ... maybe you should just use &quot;if ($html =~ /$_/i)&quot;. Greetings -- Smash your head on keyboard to continue...

Part and Inventory Search

Back
Top