ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

In Perl, if $var = "1"; and you print 'You win $var dollar'; what would it return?

 

1. You win $var dollar

2. You win $1 dollar

3. You win1 dollar

4. You win0 dollar

user-image
تم إضافة السؤال من قبل Emad Mohammed said abdalla , ERP & IT Software, operation general manager . , AL DOHA Company
تاريخ النشر: 2015/08/29
Emad Mohammed said abdalla
من قبل Emad Mohammed said abdalla , ERP & IT Software, operation general manager . , AL DOHA Company

In Perl when the print statement is using a single quote (') instead of a double quote (") Perl prints the exact characters. This means even if $var is a variable it will not be treated as one because Perl is printing the actual dollar sign. If you wanted to print the variable, so it shows how many dollars have been won you would type: "You win $var dollars"; as the command.

Mohsin Patel
من قبل Mohsin Patel , Accounting Analyst , Water G.

You win $var dollar, whatever variable value is.

المزيد من الأسئلة المماثلة