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!

Recent content by eewah

  1. eewah

    Bittorrent works, But ping and internet failed to connected

    Hi, I not sure whether I post this question to a correct forum, please let me know I am not. I having some problem in connecting to internet. The problem is very weird: (1) My BitTorrent works fine. (2) "Ping" doesn't works. BUT, when I enter an address in IE, it will direct me to...
  2. eewah

    Beginner ?: How to know actual path to imported package.?

    Lets say I have a script that require MYLIB: package require MYLIB Is there any command that I can use to locate actual path to the MYLIB package which is being required? Thanks....!
  3. eewah

    Webserver behind DLink router.

    Hi, My PC stays in a home network with another 3 machines. Its IP is 10.1.1.*. The router address is 10.1.1.1. I am unable to access my webserver from external (ISP's ip). I tried to forward all the port 80 to my local port 80 <= <i>I read some thread on this, but not sure am I doing it...
  4. eewah

    need to print status of all files in directory

    Hi, You can have some things like: foreach $filename (<*>) { ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat($filename); ........ } You can refer to this page for more information...
  5. eewah

    calling a C program from perl

    I think it is possible to have your C code compiled and being call as a perl module. just like use MySubroutine; $a = new MySubroutine; $a->main(); Read this: http://perldoc.perl.org/perlxstut.html ;-)
  6. eewah

    $obj-&gt;SUPER::....

    Hi, Ion Filipski look at this: http://perldoc.perl.org/perltoot.html ;-)
  7. eewah

    The file or directory is corrupted and unreadable - HOW?

    Thanks, The problem is solved. I run the "Properties->Tools->Error-Checking" on the affected harddisk. It deletes the corrupted files after scanning. ;-)
  8. eewah

    The file or directory is corrupted and unreadable - HOW?

    Hi, I have a portable harddisk. There a corrupted file - which is unreadable and undeletable. What can I do now? I wish to delete the corrupted file while keep all other files (if possible). Thanks. EE WAH.
  9. eewah

    Script directory

    Hi, Try this print __FILE__; ;-)
  10. eewah

    Trying to catch an error

    Hi, According to http://search.cpan.org/~gbarr/perl-ldap-0.33/lib/Net/LDAP/Entry.pod There is an method for object Net::LDAP::Entry, named: exists ( ATTR ) Returns TRUE if the entry has an attribute called ATTR. So, check the existence ( $entry->exists ('homeDirectory') ), before call (...
  11. eewah

    pack()?!

    Have you read these? http://perldoc.perl.org/functions/pack.html http://perldoc.perl.org/perlpacktut.html ;-)
  12. eewah

    Hash Value is defined or not null

    HI, Extension 1. if $string ne ' '; 2. if $string gt 0; 3. if $string !~ /^\s*$/ one more option.;-)
  13. eewah

    Find Directory Timestamp

    my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat("./New Folder"); stat command works for both directory and file. 0 dev device number of filesystem 1 ino inode number 2 mode file mode (type and permissions)...
  14. eewah

    printing problem

    Hi,mama12. just some mistake in ur code: $filename = <STDIN>; open BN, ">$filename"; my @DNA = ('A','C','G','T'); my $DNA; for (1 .. 2500) { $DNA = $DNA[int(rand(scalar @DNA))]; print BN "$DNA\n"; } close BN; U cant use length to get number of elements in an array. (use scalar instead)
  15. eewah

    strip carriage returns &amp; linefeed characters from form field

    A little more explanation: $AA=~s/\n\r/ /g; $BB=~s/[\n\r]/ /g; $CC=~tr/\n\r/ /; $DD=~s/\n/ /g;$DD=~s/\r/ /g; $EE=~s/[\n\r]+/ /g; OK, for $AA, only those have exactly "\n" followed by "\r" are replaced. those with only one "\n" , one "\r" or "\r\n" aren't replaced. (BAD) for $BB, all...

Part and Inventory Search

Back
Top