Interesting Error - Can't use string ("1909") as an ARRAY ref
while "strict refs" in use
Julian Field
MailScanner at ecs.soton.ac.uk
Fri Mar 6 19:55:34 GMT 2009
If it's complaining that int(1909) cannot be used as an array ref, then
there's not a whole lot I can do.
You could try changing the line to
while (${@{$body}}[int(scalar(@{$body})-1)+0] !~ /^\s*$/) {
(i.e. add a "+0" to it) but there really isn't much more I can do.
Try the +0 and let me know if it helps at all.
This is a nasty Perl bug.
On 6/3/09 16:35, Drew Marshall wrote:
> Jules
>
> I have made those changes to no effect. I am still getting the same
> error (With a different PID number of cause ;-) ).
>
> Any thing else I can do?
>
> Drew
>
>
> On 6 Mar 2009, at 09:12, Julian Field wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Glenn has taken a look at this, and the problem doesn't arise on his
>> Perl 5.10 systems at all.
>> And as he pointed out, it's my Perl not his :-)
>> So is this something to do with Ubuntu's build of Perl?
>>
>> However, you could edit that line of PFDiskStore.pm and change it
>> from this:
>> while (${@{$body}}[scalar(@{$body})-1] !~ /^\s*$/) {
>> to this:
>> while (${@{$body}}[int(scalar(@{$body})-1)] !~ /^\s*$/) {
>> You should probably comment out the next line (the "print" statement)
>> too.
>>
>> What I originally wrote is perfectly valid Perl, but it's managing to do
>> the "-1" but then is leaving that as a string "1909" instead of using it
>> as a number 1909 in the array reference.
>>
>> Let me know if that helps. You'll obviously need to restart MailScanner
>> after making that change :-)
>>
>> Jules.
>>
>>
>> On 5/3/09 21:00, Julian Field wrote:
>>> I think this is one for Glenn.
>>>
>>> Glenn? Any ideas?
>>>
>>> On 5/3/09 19:51, Drew Marshall wrote:
>>>> Hi all
>>>>
>>>> Just bumped into this one:
>>>>
>>>> MailScanner --debug
>>>> In Debugging mode, not forking...
>>>> Trying to setlogsock(unix)
>>>> Building a message batch to scan...
>>>> Have a batch of 10 messages.
>>>> max message size is '250000 trackback'
>>>> Can't use string ("1909") as an ARRAY ref while "strict refs" in use
>>>> at /usr/share/MailScanner//MailScanner/PFDiskStore.pm line 509.
>>>>
>>>> This is my first stray back to Linux (Usually play in FreeBSD world )
>>>> for a while but this is mt MailScanner -v
>>>>
>>>> Linux in1-b.mx.mail-launder.com 2.6.27-11-server #1 SMP Thu Jan 29
>>>> 20:13:12 UTC 2009 x86_64 GNU/Linux
>>>> This is Perl version 5.010000 (5.10.0)
>>>>
>>>> This is MailScanner version 4.74.16
>>>> Module versions are:
>>>> 1.00 AnyDBM_File
>>>> 1.18 Archive::Zip
>>>> 0.22 bignum
>>>> 1.08 Carp
>>>> 2.011 Compress::Zlib
>>>> 1.119 Convert::BinHex
>>>> 0.17 Convert::TNEF
>>>> 2.121_14 Data::Dumper
>>>> 2.27 Date::Parse
>>>> 1.01 DirHandle
>>>> 1.06 Fcntl
>>>> 2.76 File::Basename
>>>> 2.11 File::Copy
>>>> 2.01 FileHandle
>>>> 2.04 File::Path
>>>> 0.18 File::Temp
>>>> 0.92 Filesys::Df
>>>> 1.35 HTML::Entities
>>>> 3.56 HTML::Parser
>>>> 2.37 HTML::TokeParser
>>>> 1.23_01 IO
>>>> 1.14 IO::File
>>>> 1.13 IO::Pipe
>>>> 2.03 Mail::Header
>>>> 1.88 Math::BigInt
>>>> 0.21 Math::BigRat
>>>> 3.07_01 MIME::Base64
>>>> 5.426 MIME::Decoder
>>>> 5.426 MIME::Decoder::UU
>>>> 5.426 MIME::Head
>>>> 5.426 MIME::Parser
>>>> 3.07 MIME::QuotedPrint
>>>> 5.426 MIME::Tools
>>>> 0.11 Net::CIDR
>>>> 1.25 Net::IP
>>>> 0.16 OLE::Storage_Lite
>>>> 1.04 Pod::Escapes
>>>> 3.07 Pod::Simple
>>>> 1.13 POSIX
>>>> 1.19 Scalar::Util
>>>> 1.80 Socket
>>>> 2.18 Storable
>>>> 1.4 Sys::Hostname::Long
>>>> 0.26 Sys::Syslog
>>>> 1.26 Test::Pod
>>>> 0.8 Test::Simple
>>>> 1.9711 Time::HiRes
>>>> 1.02 Time::localtime
>>>>
>>>> Optional module versions are:
>>>> 1.38 Archive::Tar
>>>> 0.22 bignum
>>>> missing Business::ISBN
>>>> missing Business::ISBN::Data
>>>> missing Data::Dump
>>>> 1.816_1 DB_File
>>>> 1.14 DBD::SQLite
>>>> 1.605 DBI
>>>> 1.15 Digest
>>>> 1.01 Digest::HMAC
>>>> 2.36_01 Digest::MD5
>>>> 2.11 Digest::SHA1
>>>> missing Encode::Detect
>>>> 0.17010 Error
>>>> 0.21 ExtUtils::CBuilder
>>>> 2.18_02 ExtUtils::ParseXS
>>>> 2.37 Getopt::Long
>>>> missing Inline
>>>> missing IO::String
>>>> 1.09 IO::Zlib
>>>> missing IP::Country
>>>> missing Mail::ClamAV
>>>> 3.002005 Mail::SpamAssassin
>>>> v2.006 Mail::SPF
>>>> 1.999001 Mail::SPF::Query
>>>> 0.280801 Module::Build
>>>> 0.20 Net::CIDR::Lite
>>>> 0.63 Net::DNS
>>>> missing Net::DNS::Resolver::Programmable
>>>> missing Net::LDAP
>>>> 4.007 NetAddr::IP
>>>> missing Parse::RecDescent
>>>> missing SAVI
>>>> 2.64 Test::Harness
>>>> missing Test::Manifest
>>>> 2.0.0 Text::Balanced
>>>> 1.35 URI
>>>> 0.74 version
>>>> missing YAML
>>>>
>>>> Don't think there is any thing else special about this box, it's just
>>>> a bog standard Ubuntu 8.10 server install, with as much as possible
>>>> installed via apt and running the latest stable release. I've not got
>>>> to the clever stuff yet ;-)
>>>>
>>>> Not being a perl gruru and certainly not with Jules' fine work, I am
>>>> now at the "help" stage :-)
>>>>
>>>> Drew
>>>>
>>>> --
>>>> In line with our policy, this message has been scanned for viruses
>>>> and dangerouscontent by our Mail Launder system www.mail-launder.com
>>>> Our email policy can be found at www.trunknetworks.com/policy
>>>>
>>>> Trunk Networks Limited is registered in Scotland with registration
>>>> number: 351063
>>>> Registered Office 55-57 West High Street Inverurie AB51 3QQ
>>>>
>>>
>>> Jules
>>>
>>
>> Jules
>>
>> - --
>> Julian Field MEng CITP CEng
>> www.MailScanner.info
>> Buy the MailScanner book at www.MailScanner.info/store
>>
>> Need help customising MailScanner?
>> Contact me!
>> Need help fixing or optimising your systems?
>> Contact me!
>> Need help getting you started solving new requirements from your boss?
>> Contact me!
>>
>> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
>>
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: PGP Desktop 9.9.1 (Build 287)
>> Comment: Use Enigmail to decrypt or check this message is legitimate
>> Charset: ISO-8859-1
>>
>> wj8DBQFJsOkWEfZZRxQVtlQRAoBJAKC2BxZ4PDr7pAsLIW6GGD61bGC6BACeNZdN
>> ZU+mORyEKc5W77CrkCx5nUQ=
>> =qSAn
>> -----END PGP SIGNATURE-----
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>> --
>> MailScanner mailing list
>> mailscanner at lists.mailscanner.info
>> http://lists.mailscanner.info/mailman/listinfo/mailscanner
>>
>> Before posting, read http://wiki.mailscanner.info/posting
>>
>> Support MailScanner development - buy the book off the website!
>
Jules
--
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
PGP public key: http://www.jules.fm/julesfm.asc
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the MailScanner
mailing list