in reply to system command with here-doc
I want to find a way to make the above command work or a suitable alternative would do.system ("newgrp ankoor <<BLAH\n cleartool setview -exec \"cleartool ln + -s $rtl_compiles_dir/$new_release $topsim_dir/SIMULIBS/vcsmx/$new_re +lease\" $view_name \n 2>>$0.ERR") if (!$flag_link);
Seems like a valid question to me. OP wants to be able to run this in perl (or to have a perl replacement to this command)...
Don't know exactly in detail what this command does, but newgrp changes the current group ID during a login session, so this seems a problem related with to modify "$(" and/or "$)". You could find useful also POSIX::setgid() for this problem instead newgrp
use POSIX qw(setgid); $my_new_group_id = POSIX::setgid();
Another question is if your here-doc is correctly formated, I can see the start of the here-doc <<BLAH, but I can't find the last BLAH closing the here-doc
|
|---|