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 Mike Lewis 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: WebGoat
  • Order by date
  1. WebGoat

    whats wrong ?

    got some peace at least. Thank you
  2. WebGoat

    whats wrong ?

    >but also one of perls weakenesses Sir,yes,i also term it as a weakness. because it is hiding the fact! anyway, so you mean there are some functions which uses this $_ variable. but in your previous example which you posted (while loop code) there is no function nor operator is no it ...
  3. WebGoat

    whats wrong ?

    Sir, This is a very difficult statement to understand. i got more confused when i read the following tutorial The $_ special variable We could use a conditional as if ($sentence =~ /under/) { print "We're talking about rugby\n"; } which would print out a message if we had either of...
  4. WebGoat

    whats wrong ?

    <INFO> reads a record from the file and stores that line in $_ automatically. OK . good. is it exclusive for only for Files ? had it not been a file , but a simple array which contanis some data, will the same occured ? in fact, i am worried about in which place this works and in which...
  5. WebGoat

    whats wrong ?

    many thanks sir, can i ask one more very simplest question ? you made a comment... # Read each line from file to $_ in turn but where did you assign the line to $_ . you did not assign it. how does it get the value ? i am feeling uncomfortable with this. will you please tell me whats...
  6. WebGoat

    whats wrong ?

    i have one more smallest question. as i am learning perl , can i use perl in windows machine ? right now, i am writing codes in linux machine. is perl only exclusive for linux machine ? does it work in windows 2000, windows XP machine ?
  7. WebGoat

    whats wrong ?

    this works fine. you have explained very nicely. thanks i also examined with print $_; // just prints variable print "\n"; // just prints the newline and also print $_."\n"; // i read this the rule concatecation of sting and i am comfortable with these two syntax. i was not feeling...
  8. WebGoat

    whats wrong ?

    in this context i just have a small question you gave me his code in my previous post code was like below while(<>) { # $_ contains each line from the file, one at a time # process the line here. } will you please how do you read line by lne with a while loop ? i am reading with a...
  9. WebGoat

    whats wrong ?

    superb!. its working now. sorry for the silly mistake. i have deleted the old file. and ceated a new one.
  10. WebGoat

    whats wrong ?

    #!/usr/local/bin/perl-w use strict; use diagnostics; # Program to open the password file, read it in, # print it, and close it again...
  11. WebGoat

    learn perl

    ok, NO problem . let it output whatever it wants. i must stop this post . i am happy whatever i have learnt . thanks
  12. WebGoat

    learn perl

    >What did you expect your program to output? i want the program should not print the output at all. you know C,C++,JAVA all programs behaves dont show output once there is some compile erorr. this language is somewhat exceptional
  13. WebGoat

    file problem

    @lines = <INFO>; my god ! if the file is huge, then the prgranm may crash at any time . how many MAXIMUM lines an perl array can contain ?
  14. WebGoat

    learn perl

    but the program outputs 9. tha was a unfortunate thing [mad]
  15. WebGoat

    learn perl

    excellent !! and excellent ! this error is really self-explanarotory. any body can understand this error message and find out the place where this error has occured. so, i have decided to use -w, use strict, use diagonstics and ALL MY VARIABLES would be prefixed by the my keyword. its...
  16. WebGoat

    file problem

    ohh, yea, you mean the absolute path. ok . all right. thanks glad to talk with perl experts
  17. WebGoat

    learn perl

    ohh , forgot to post the code. i did intentonally wrong code to test -w and use strict here is the code #!/usr/local/bin/perl -w use strict; #@food = ("apples", "pears", "eels"); #$l=push(@food, "eggs", "lard"); #($a, $b) = @food; #$f ="@food"; #print $b; #($a, $b) = ($c, $d); $d='009'...
  18. WebGoat

    learn perl

    >without use strict and -w was a good choice. because of its readibility of error messages. it directly specifies the error in a simpler way.
  19. WebGoat

    learn perl

    but they are suppresingg errors. using strict and -w i got error Global symbol "$d" requires explicit package name at test line 9. Global symbol "$e" requires explicit package name at test line 10. Global symbol "$f" requires explicit package name at test line 11. Global symbol "$d"...
  20. WebGoat

    file problem

    $file = '/etc/passwd'; # Name the file open(INFO, $file); # Open the file i made the bold statements . i just could not understand those statements. will you plese tell me in a simpler way ? what those statements wants to say ? please rovide an easy example. thanks for your time.

Part and Inventory Search

Back
Top