You can (i.e. you are legally permitted) to put a GPL license on any piece of software that you wrote, no matter how trivial it is.
A license only has real meaning with respect to your rights if you are willing to try to enforce it. That means that you need to track down people who violate your rights, and try to get them to stop, ultimately by taking them to court. For a sufficiently small program (i.e. trivial), it is simply not worth your effort to do that:
The chances that nobody who matters1 will bother to violate your rights in a way that matters in the first place. (Your program is trivial, and could therefore be trivially replaced with a program they wrote themselves ... assuming that it was worth using.)
If they did violate, and you discovered this, it would cost you money to sue them. (Lawyer's fees, court costs, discovery costs, etc, etc.)
There is a significant chance that your lawsuit would be thrown out on "Summary Judgement" ... where the Judge basically decides that you cannot sustain a case on legal grounds. (For example, that your program doesn't contain the minimal amount of copyrightable content.)
If you do get to a trial, here is a significant chance that you will lose anyway, unless you can convince the judge or jury that your trivial program is worthy of protection.
Even if you win, it is likely that you will only be awarded trivial damages ... leaving your out of pocket for all of the expenses you incurred.
In short, it is not worth suing over a "trivial" program. (Use your own judgement to decide what is trivial ... in this context.)
So that means that slapping an open source (or closed source) license on a piece of trivial software makes no material difference in terms of protecting your rights.
On the other hand, if your aspirations for your software are altruistic, putting an explicit (open source) license on a piece of software does make it clear to potential users of your software what their rights are. If you neglect to include a license, some future user may be left in the awkward position of not knowing your intention, and not being able to contact you to ask permission.
I've encountered situations where I wanted to include a worthy bit of code into a larger open source project, only to discover that the author hadn't put an explicit license on it, and either wasn't contactable, or wasn't interested in clarifying the situation by stating what the license was. Net result - it was too risky to incorporate the code in the project.
(Legally, the default position is that copyrightable material is copyrighted by the author(s) and permission to copy is NOT granted.)
1 - That is, some person, company, organization who has enough resources to be worth suing. Suing someone with no money means you won't get a payout, and you are liable to be labelled a bully and a copyright troll.