Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

what about System.gc

by dominix (Deacon)
on Jun 28, 2005 at 09:20 UTC ( [id://470539]=perlquestion: print w/replies, xml ) Need Help??

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

Hi fellowmonks, I've recently discovered the System.gc in a script, and it was the first time I saw this function. So I imediately typed a
perldoc -f System.gc No documentation for perl function `System.gc' found perl -c -e 'System.gc;' -e syntax OK
I'm curious about that, can someone explain what this does ? where it come from ? it look like a call to Garbage collector, but how do I use it ?
Thanks
--
dominix

Replies are listed 'Best First'.
Re: what about System.gc
by Corion (Patriarch) on Jun 28, 2005 at 09:26 UTC

    You're likely looking at a script not written in or for Perl. If you use warnings, Perl will tell you what it sees instead:

    perl -we "System.gc" Useless use of a constant in void context at -e line 1.

    What Perl sees here is the concatenation of two bareword strings:

    perl -we "print System.gc" Unquoted string "gc" may clash with future reserved word at -e line 1. Systemgc

    Perl has no garbage collector, as it uses reference counting only.

      Indeeed, the code is likely Java.

      lol, thanks Corion.
      I learn about perl everyday and so I was too curious what this was about, to think it was not Perl. :)
      thanks for the quick response.
      --
      dominix

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-18 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found