rkshyam has asked for the wisdom of the Perl Monks concerning the following question:
Hi, This is my small portion of a bigger program. I need to concatenate 3 variables.The details are here.But output is r +esulting in 2 seperate lines rather than on a single line or in an another way I need to add \dir2 to the main directory path C: +\shyam\dir1 and final path should be "C:\shyam\dir1\dir2" when printed or accessed in program but i am get +ting as C:shyam\dir1 and \dir2 in 2 seperate lines.Because of this my + copy is failing. Please help
$\ = "\n" ; $, = "\t" ; #$|=1; use strict; use warnings; use POSIX qw[ _exit ]; use MIME::Lite; use Sort::External; use Net::Ping; use Win32::DriveInfo; $source="C:\shyam\dir1; $sym="\"; $file="dir2"; ## please note that this value is not directly assigned +but being extracted from another directory path using slicing.Ex: C:\ +sundar\dir2 $source_mod=join '',$source,$sym,$file; print "$source_mod"; Note: I have also used . opeartor but result is still the same.I am su +specting about $\="\n" in the beginning.But this is required as the o +ther part of my program needs this. Please help
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: concatenation of variables resulting in 2 seperate lines
by Corion (Patriarch) on Jul 25, 2012 at 10:32 UTC | |
by rkshyam (Acolyte) on Jul 25, 2012 at 11:20 UTC | |
by Corion (Patriarch) on Jul 25, 2012 at 11:25 UTC | |
|
Re: concatenation of variables resulting in 2 seperate lines
by BillKSmith (Monsignor) on Jul 25, 2012 at 13:21 UTC | |
|
Re: concatenation of variables resulting in 2 seperate lines
by tfredett (Sexton) on Jul 25, 2012 at 13:51 UTC | |
by rkshyam (Acolyte) on Jul 25, 2012 at 15:14 UTC |