Home: Perl Programming Help: Beginner:
text directly after a $whatever



mwaf
Deleted

Feb 10, 2000, 10:11 PM


Views: 1418
text directly after a $whatever

I need to print to a file "asdf$whateverasdf" where $whatever = "hmmm"; and it turns out "asdf" because it doesn't understand that it's $whatever not $whateverasdf. I don't blame this for not working but i would like to know what to put inbetween to get the asdf text directly after $whatever so that the file would turn out "asdfhmmmasdf".

A space won't solve the problem, or it will, but it will result "asdfhmmm asdf" and I don't want that it messes up things. I've tried puting a '\' but that didn't obviously work so does anyone know what to put there as there most be something :-)
Thanks!


Cure
User

Feb 11, 2000, 12:11 PM


Views: 1418
Re: text directly after a $whatever

Hi mwaf

I did some research on comp.lang.perl.misc and japhy gave me the solution(s) to make it print asdfhmmmasdf

print "asdf", $whatever, "asdf";
print "asdf" . $whatever . "asdf";
print "asdf${whatever}asdf";


[This message has been edited by Cure (edited 02-11-2000).]


mwaf
Deleted

Feb 12, 2000, 3:39 AM


Views: 1418
Re: text directly after a $whatever

Thanks, you really seem to be the 'Cure' :-)