in reply to Re^3: converting from string to SCALAR when using strict "refs"
in thread converting from string to SCALAR when using strict "refs"

I tried out kyles suggestion of putting a '\' before the $processor but got the error message
Processor is SCALAR(0x15f1a8) and qmgr is QM_P266 In bind_cpu_solaris , Processor is SCALAR(0x15f1a8) In for loop ... In Next Loop ... /usr/sbin/pbind: must specify at least one pid usage: /usr/sbin/pbind -b processor_id pid[/lwpids] ...
The processor variable is populated in one other location where it looks for pid's of other processes already bound to a specific processor and tries to bind to the same (i.e populate $processor with the same proocessor id). the code is like the below:
sub get_cpu_used_by_other_processes { my $other_process = shift; my $proc_id = locate_process_id( $other_proc ); my $processor = undef; my $pid = undef; my @cmd_output = `$os_command_table{$^O}{pbind} -q 2>/dev/null +`; die "ERROR:failed to retrieve the bound processors\n" unless ( + $? == 0 ); ##### increase the weight of processors based on used or not # +#### foreach ( keys %{$proc_id} ) { $pid = $$proc_id{$_}; next unless defined $pid; foreach ( @cmd_output ) { $processor = $1, return \$processor if /proces +s\s+id\s+${pid}\s*:\s*(\d+) $/; } } }