J
John Maclean
Chaps,
Say you've defined a variable:-
a = "l2.txt" # where l2.txt is a file that you know exists
irb(main):009:0> File.exist?("l2.txt")
=> true
#How can I use the variable a within the File.exist(parameter)?
irb(main):012:0> a
=> "l2.xt"
irb(main):013:0> File.exist?(a)
=> false
irb(main):015:0> File.exist?("#@a")
=> false
Say you've defined a variable:-
a = "l2.txt" # where l2.txt is a file that you know exists
irb(main):009:0> File.exist?("l2.txt")
=> true
#How can I use the variable a within the File.exist(parameter)?
irb(main):012:0> a
=> "l2.xt"
irb(main):013:0> File.exist?(a)
=> false
irb(main):015:0> File.exist?("#@a")
=> false