[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: offtopic: perl question about dialog.pl



-----BEGIN PGP SIGNED MESSAGE-----

On Mon, 25 Oct 1999, Olaf Conradi wrote:

> Use of implicit split to @_ is deprecated at ./dialog.pl line 34.
> 
>     $message_len = split(/^/, $message);        # <-- line 34

split always splits to an array. Here, you're trying to get the number of
elements generated by the split call, so it implicitly splits to the @_
array. This is depreciated.

One way to get the same effect would be to use the s/// funtion something
like this:
    $message_len = $message=~s/^/^/mog;

There may be other ways. Those other ways may even be better.


- -- 
  finger for PGP public key.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv

iQCVAwUBOBPiNr7M/9WKZLW5AQGe6wQAo3DIzrc4An6A2AYMQ68T+KuJmS4oT7kr
iHPgHpkfWDmnqh127QohHs0Ch/3u+60j3HnAEOMJbNPT1Blybc4g4Mfc2T6rhmHo
ExQnAxgMM8J8vjYjfST/IlbfTKwjXyo3LNqXldsdojI2RLXXZzxFzchyxTW53oBn
0sE8umh8ceQ=
=JnCc
-----END PGP SIGNATURE-----


Reply to: