Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Perl memset equivalent?

by sauoq (Abbot)
on Jun 26, 2012 at 18:43 UTC ( #978486=note: print w/replies, xml ) Need Help??


in reply to Perl memset equivalent?

It's hard to guess what you are trying to achieve exactly... Do you want:

@stn_names = (0) x STN_NAME_LEN;
which gives you an array filled with five zeros? Or do you want something more like:
my $s = pack "c5", (0)x5;
which will give you a string packed with 5 nulls?

-sauoq
"My two cents aren't worth a dime.";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://978486]
help
Chatterbox?
[Corion]: Oh yay. $project has faffed around for 2 years and now pushed a hasty 2 weeks solution into production without telling me. Of course, the new data also needs changes on my side to be processed correctly. Now they try to raise incidents against my ...
[Corion]: ... input systems to make the change outside of the organized project because I don't have ressources for the project to make the change.

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2017-08-17 09:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (285 votes). Check out past polls.

    Notices?