[linux-l] Perl Problemchen

Bodo Eichstädt retsam at gmx.de
Mi Mai 25 17:38:43 CEST 2005


Hallo Liste

folgendes Codestück funktionierte immer.


sub get_time {          # 1. Param -> Zeit in Sekunden
                         # 2. Param -> 0 Zeit, 1 Datum, 2 Zeit und Datum 

                         # 3. Param -> Trennstring zw. Datum und Zeit

    my @time = localtime($_[0]);     #hier hakt es!!!!
    $time[4]++; $time[5] += 1900;
    foreach ((@time)[0..4]) {$_ =~ s/\A(\d)\Z/0$1/;}

    #ZEIT
    if (!$_[1])
      {return join(".",(@time)[2,1,0]);} 


    #DATUM
    elsif ($_[1]==1)
      {return join(".",(@time)[3..5]);}

    #ZEIT && DATUM
    elsif ($_[1]==2)
      {return join(".",(@time)[3..5]).$_[2].join(".",(@time)[2,1,0]);} 

}



Plötzlich aus heiterem Himmel bekomme ich jedoch die Fehlermeldung:


*************************************************************************
Modification of a read-only value attempted at backend-std-lib.pl line 538.
*************************************************************************


Besagte Zeile 538 ist die mit dem: my @time = localtime($[0]);

Die einzige Veränderung sind die regulären Paketupdates. Die aktuelle 
Perl-Version ist:

ii  perl           5.6.1-8.9      Larry Wall's Practical Extraction and 
Report
ii  perl-base      5.6.1-8.9      The Pathologically Eclectic Rubbish 
Lister.
ii  perl-modules   5.6.1-8.9      Core Perl modules.


Weiss jemand Rat? Und, ja ich habe Google in allen mir erdenklichen 
Variationen befragt. *nerv*

Wenn jemand den Fehler gegen Entgeld behaben mag, bitte auch melden!

Gruß,
Bodo



Der Folständigkeit halber, die komplette Liste von *perl*-artigen Paketen:

ii  libapache-mod- 1.26-3.0woody1 Integration of perl with the Apache 
web serv
ii  libarchive-tar 0.22-2         module for manipulation of tar archives.
ii  libarchive-zip 0.11-1         Module for manipulation of ZIP archives
ii  libcompress-zl 1.16-1         Perl module for creation and 
manipulation of
ii  libconfig-inif 2.27-1         A module for reading .ini-style 
configuratio
ii  libconvert-tne 0.16-2         Perl module to read TNEF files
ii  libconvert-uul 0.201-2woody1  Perl interface to the uulib library 
(a.k.a.
ii  libcrypt-sslea 0.23-2.1       Support for https protocol in LWP
ii  libdate-calc-p 5.0-2          Perl library for accessing dates
ii  libdbd-mysql-p 1.2216-2       mySQL database interface for Perl
ii  libdbi-perl    1.21-2woody2   The Perl5 Database Interface by Tim Bunce
ii  libdevel-symdu 2.02-1         Perl module for inspecting perl's 
symbol tab
ii  libdigest-hmac 1.01-1         create standard message integrity checks
ii  libdigest-md5- 2.13-2         MD5 Message Digest for Perl
ii  libdigest-sha1 2.00-1         NIST SHA-1 message digest algorithm
ii  libgd-graph-pe 1.33-4         Graph Plotting Module for Perl 5
ii  libgd-graph3d- 0.59-1         Create 3D Graphs with GD and GD::Graph
ii  libgd-perl     1.38-5         Perl module wrapper for libgd
ii  libgd-text-per 0.82-1         Text utilities for use with GD
ii  libgetopt-mixe 1.008-6        Perl module for processing options in 
GNU-st
ii  libhtml-format 1.23-1         Format HTML syntax trees
ii  libhtml-parser 3.25-1         A collection of modules that parse 
HTML text
ii  libhtml-tagset 3.03-1         Data tables pertaining to HTML
ii  libhtml-tree-p 3.11-2         represent and create HTML syntax trees
ii  libio-socket-s 0.80-2         Class implementing an object oriented 
interf
ii  libio-stringy- 2.108-1        Perl5 modules for IO from scalars and 
arrays
ii  libmail-audit- 2.0-4          Perl library for creating easy mail 
filters
ii  libmailtools-p 1.44-1woody2   Manipulate email in perl programs
ii  libmime-base64 2.12-4         MIME/Base64 decoding for Perl
ii  libmime-perl   5.411-1        Perl5 modules for MIME-compliant 
messages (M
ii  libnet-dns-per 0.19-0.1       Net::DNS is a Perl interface to the 
DNS reso
ii  libnet-perl    1.09.01-1      Implementation of Internet protocols 
for Per
ii  libnet-ph-perl 2.21-2         Perl module for accessing ph servers
ii  libnet-snpp-pe 1.11-2         Perl module for accessing SNPP servers
ii  libnet-ssleay- 1.08-1.1       Perl module for Secure Sockets Layer (SSL)
ii  libnet-telnet- 3.02-1         Script telnetable connections
ii  libparse-recde 1.80-2         Generates recursive-descent parsers in 
Perl
ii  libperl5.6     5.6.1-8.9      Shared Perl library.
ii  libsnmp-sessio 0.90-1         Perl support for accessing SNMP-aware 
device
ii  libtime-hires- 1.20-4         High-resolution time manipulation in perl
ii  libtimedate-pe 1.11-1         Time and date functions for perl.
ii  libunix-syslog 0.98-1         Perl interface to the UNIX syslog(3) calls
ii  liburi-perl    1.18-1         Manipulates and accesses URI strings
ii  libwww-perl    5.64-1         WWW client/server library for Perl
ii  perl           5.6.1-8.9      Larry Wall's Practical Extraction and 
Report
ii  perl-base      5.6.1-8.9      The Pathologically Eclectic Rubbish 
Lister.
ii  perl-modules   5.6.1-8.9      Core Perl modules.






Mehr Informationen über die Mailingliste linux-l