Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Can't use string ("8") as an ARRAY ref while

by Anonymous Monk
on Apr 16, 2018 at 08:57 UTC ( #1212971=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am getting this error : -bash-4.1$ ./trigger_install.1.pl -p VSX -shared -d /usr/prod/vobstore210/cmbp/vsx/cm-policy vob = /usr/vob/sc/sdu cmd = /usr/atria/bin/cleartool describe attype:ProductVOB@vob:/usr/vob/sc/sdu outRef = ARRAY(0x170ce28) typename = attype:ProductVOB Can't use string ("8") as an ARRAY ref while "strict refs" in use at ./trigger_install.1.pl line 669 Perl version is: -bash-4.1$ perl -version This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi Copyright 1987-2009, Larry Wall
  • Comment on Can't use string ("8") as an ARRAY ref while

Replies are listed 'Best First'.
Re: Can't use string ("8") as an ARRAY ref while
by choroba (Archbishop) on Apr 16, 2018 at 09:04 UTC
    Please, show the relevant code, especially several lines around line 669 of trigger_install.pl. Also, please use the <code>...</code> tags to format your code to make it easier for us to decipher what's there.

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
Re: Can't use string ("8") as an ARRAY ref while
by kcott (Bishop) on Apr 17, 2018 at 07:23 UTC

    This is a complete guess; although, it may provide a useful hint.

    You might have code that's something like this:

    $ perl -E 'use strict; my @x = qw{a b c}; my $y = @x; say $y->[1]' Can't use string ("3") as an ARRAY ref while "strict refs" in use at - +e line 1.

    When you really wanted something like this:

    $ perl -E 'use strict; my @x = qw{a b c}; my $y = \@x; say $y->[1]' b

    Note the differences in the assignments to $y.

    If that guess doesn't help, you'll need to show us some code (as already requested). Take a look at "How do I post a question effectively?" to see what information we need and how to present it.

    — Ken

Re: Can't use string ("8") as an ARRAY ref while
by Anonymous Monk on Apr 16, 2018 at 09:00 UTC
    And then what happened?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1212971]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2020-10-25 05:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (249 votes). Check out past polls.

    Notices?